Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support indexof array expression function #176

Closed
jonmmease opened this issue Dec 1, 2022 · 0 comments · Fixed by #179
Closed

Support indexof array expression function #176

jonmmease opened this issue Dec 1, 2022 · 0 comments · Fixed by #179
Labels
enhancement New feature or request

Comments

@jonmmease
Copy link
Collaborator

jonmmease commented Dec 1, 2022

The Vega indexof expression function is generated by the Vega-Lite oneOf predicate, so it would be great to support it in VegaFusion.

The exact expression form that Vega-Lite generates is:

indexof(["v1", "v2"], datum["col"]) !== -1)

I don't think indexof is a very common relational database expression function, but this particular expression could be transformed into col in ['v1', 'v2']. Initially, let's add a DataFusion UDF for indexof, but down the road we may want to add a specific expression transformation so that it's easier to compile this use of indexof into general SQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant