Skip to content

[APP-736] fix: default filters producing array-wrapped values in IN/NIN expressions#8903

Open
briangregoryholmes wants to merge 3 commits intomainfrom
bgh/flatten-default-filters
Open

[APP-736] fix: default filters producing array-wrapped values in IN/NIN expressions#8903
briangregoryholmes wants to merge 3 commits intomainfrom
bgh/flatten-default-filters

Conversation

@briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Feb 21, 2026

  • The Go backend's filter parser creates IN/NIN expressions with array-valued entries (e.g. { val: ["Name"] }) instead of individual value expressions ({ val: "Name })
  • When serialized to a filter string this produces username NIN (['Name']) instead of username NIN ('Name'), which fails when sent to the API
  • Apply flattenInExpressionValues in getFiltersFromText and flattenExpression to normalize array-valued IN/NIN expressions at both entry points

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Copy link
Contributor

@ericokuma ericokuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Brian! LGTM!

const { expr, dimensionsWithInlistFilter: dimensionsWithInListFilter } =
getFiltersFromText(filterString ?? "");

console.log({ expr, dimensionsWithInListFilter, filterString });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants