ConeyLiu commented on code in PR #7898:
URL: https://github.com/apache/iceberg/pull/7898#discussion_r1245026734
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/SparkV2Filters.java:
##########
@@ -152,31 +159,30 @@ public static Expression convert(Predicate predicate) {
}
case EQ: // used for both eq and null-safe-eq
- Object value;
- String columnName;
- if (isRef(leftChild(predicate)) && isLiteral(rightChild(predicate)))
{
- columnName = SparkUtil.toColumnName(leftChild(predicate));
- value = convertLiteral(rightChild(predicate));
- } else if (isRef(rightChild(predicate)) &&
isLiteral(leftChild(predicate))) {
- columnName = SparkUtil.toColumnName(rightChild(predicate));
- value = convertLiteral(leftChild(predicate));
- } else {
+ PredicateChildren<Object> eqChildren = predicateChildren(predicate);
+ if (eqChildren == null) {
return null;
}
- if (predicate.name().equals(EQ)) {
- // comparison with null in normal equality is always null. this is
probably a mistake.
+ if (EQ.equals(predicate.name())) {
+ // comparison with null in normal equality is always null. this is
probably a
+ // mistake.
Review Comment:
Reverted
--
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]