intuit / intuit/common-xtext-expression-language

Add primitive array support for filter function.

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
enhancement moderate
Dominant language
Java
Stars
11
Forks
6
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

The filter function does not support filtering primitive arrays like below
```filter(["foo", "bar", "foobar"], length(it)==3) ```

This is mainly because it does not support the `it` reference

**Describe the solution you'd like**

Add support for `it` operator in filter function, so that it supports primitive array

Contributor guide

Open the contributing guide

Research direction

Start by locating the filter function implementation and the handling of the `it` reference in the expression evaluator. Reproduce the primitive-array example from the issue, then add coverage showing that `filter(["foo", "bar", "foobar"], length(it)==3)` works and verify existing filter behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.