JiajunBernoulli commented on code in PR #3207:
URL: https://github.com/apache/calcite/pull/3207#discussion_r1199683359
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -3791,6 +3791,12 @@ private static AtomicLong getAtomicLong(String key) {
return atomic;
}
+ /** Support the ARRAY_CONTAINS function. */
+ public static boolean contains(List list, Object element) {
+ final Set set = new HashSet(list);
Review Comment:
In fact, set has not been reused, and I don't think it can improve speed.
Because the construction time of the set may be longer than the search time
of the list.
--
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]