You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/08/31 21:04:58 UTC
[GitHub] [pinot] walterddr commented on a diff in pull request #9300: [array] add cardinality function
walterddr commented on code in PR #9300:
URL: https://github.com/apache/pinot/pull/9300#discussion_r960025052
##########
pinot-common/src/main/java/org/apache/pinot/common/function/TransformFunctionType.java:
##########
@@ -90,6 +90,7 @@ public enum TransformFunctionType {
ARRAYMIN("arrayMin"),
ARRAYMAX("arrayMax"),
ARRAYSUM("arraySum"),
+ ARRAYCARDINALITY("arrayCardinality", "cardinality"),
Review Comment:
yes they are the same. technically speaking we should create an "CardinalityTransformOperator" and should accept any input (map/list/mv/sv) and
- map will be map.size()
- list will be list.size()
- mv will be mv.length
- sv will always return literal 1
but since CARDINALITY should only work against mv/list/map. it is currently equivalent to ARRAYLENGTH
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org