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 Array function for multi-value columns #6083

Open
4 of 8 tasks
xiangfu0 opened this issue Sep 30, 2020 · 9 comments
Open
4 of 8 tasks

Support Array function for multi-value columns #6083

xiangfu0 opened this issue Sep 30, 2020 · 9 comments
Assignees

Comments

@xiangfu0
Copy link
Contributor

xiangfu0 commented Sep 30, 2020

Inspired by presto array functions(https://prestodb.io/docs/current/functions/array.html),
we can first support those transform functions on multi-value to 1 value result.

  • array_average
  • array_max
  • array_min
  • array_sum
  • array_position
  • cardinality
  • contains
  • element_at
@xiangfu0
Copy link
Contributor Author

xiangfu0 commented Oct 1, 2020

cc: @npawar @KKcorps

@xiangfu0
Copy link
Contributor Author

xiangfu0 commented Oct 9, 2020

Optimize query perf by existing multi-value aggregation functions capability.
#6127

@jpohanka
Copy link

@xiangfu0 Are there plans to implement the remaining functions, in particular, element_at ?

Currently, we need to use arraySlice for picking a single element from an array.

@walterddr
Copy link
Contributor

do we want to support any boolean functions like

  • MATCH_ANY
  • MATCH_ALL
  • MATCH_NONE
    (all of these are element-wise predicate evaluators)

@skjindal93
Copy link

Is there any plan to support ARRAY_AGG or ARRAY_JOIN aggregation function, which concatenates the values into an array?

@monicaluodialpad
Copy link

monicaluodialpad commented Jun 5, 2023

Do we have support on element_at already? Is this for returning the item at specific index?

@npawar
Copy link
Contributor

npawar commented Jun 6, 2023

@monicaluodialpad
Copy link

@npawar Hi, thank you! I also find this but it seems that we don't have query support: https://github.com/apache/pinot/blob/master/pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java I didn't find any related function types.

@npawar
Copy link
Contributor

npawar commented Jun 7, 2023

@npawar Hi, thank you! I also find this but it seems that we don't have query support: https://github.com/apache/pinot/blob/master/pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java I didn't find any related function types.

In the link I shared, they've been added as ScalarFunctions. Scalar functions work for ingestion as well as query, so you should be able to use them in query. Are you not able to get them to work at query time?

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

No branches or pull requests

6 participants