rdblue commented on code in PR #7898:
URL: https://github.com/apache/iceberg/pull/7898#discussion_r1244369323


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/SparkV2Filters.java:
##########
@@ -245,6 +251,46 @@ public static Expression convert(Predicate predicate) {
     return null;
   }
 
+  private static <T> PredicateChildren<T> predicateChildren(Predicate 
predicate) {
+    T value;
+    UnboundTerm<T> term;
+    if (isRef(leftChild(predicate)) && isLiteral(rightChild(predicate))) {
+      term = ref(SparkUtil.toColumnName(leftChild(predicate)));
+      value = convertLiteral(rightChild(predicate));
+    } else if (isRef(rightChild(predicate)) && 
isLiteral(leftChild(predicate))) {
+      term = ref(SparkUtil.toColumnName(rightChild(predicate)));
+      value = convertLiteral(leftChild(predicate));
+    } else {
+      return null;
+    }
+
+    return new PredicateChildren<>(term, value);
+  }
+
+  private static <T> UnboundPredicate<T> handleEqual(PredicateChildren<T> 
children) {

Review Comment:
   Can you move this back to where it was so that the diff is readable?



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