herunkang2018 commented on code in PR #3202:
URL: https://github.com/apache/calcite/pull/3202#discussion_r1195810470
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -3797,6 +3797,29 @@ public static List distinct(List list) {
return new ArrayList<>(result);
}
+ /** Support the ARRAY_EXCEPT function. */
Review Comment:
Is the result order of these functions consistents with the parametes order?
For example:
> SELECT array_union(array(1, 2, 3), array(1, 3, 5));
> return: [1,2,3,5]
Is it valid to return [5,1,3,2]?
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -3797,6 +3797,29 @@ public static List distinct(List list) {
return new ArrayList<>(result);
}
+ /** Support the ARRAY_EXCEPT function. */
Review Comment:
If we don't consider order here, can we use `HashSet` to implement to get
better performance?
I see spark's implementation, it uses `OpenHashSet` which is not ordered
from what I know so far.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]