cloud-fan commented on code in PR #47984:
URL: https://github.com/apache/spark/pull/47984#discussion_r1749886956


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ArrayExpressionUtils.java:
##########
@@ -116,58 +116,131 @@ public class ArrayExpressionUtils {
     return SQLOrderingUtil.compareDoubles(c1, c2);
   };
 
+  // boolean
+  // foldable optimize
+  public static int binarySearchNullSafe(Boolean[] data, Boolean value) {

Review Comment:
   I think it's better to take `ArrayData` here to simplify the expression 
implementation. We can call `arrayData.toBooleanArray` or `.toObjectArray` for 
non-nullable and nullable arrays.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to