You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/12/16 00:58:19 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6402: Flink: Add UT for NaN

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


##########
flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/FlinkFilters.java:
##########
@@ -246,18 +248,70 @@ private static Optional<Expression> convertFieldAndLiteral(
     org.apache.flink.table.expressions.Expression left = args.get(0);
     org.apache.flink.table.expressions.Expression right = args.get(1);
 
-    if (left instanceof FieldReferenceExpression && right instanceof ValueLiteralExpression) {
-      String name = ((FieldReferenceExpression) left).getName();
-      Optional<Object> lit = convertLiteral((ValueLiteralExpression) right);
+    Optional<Object> lit;
+    if (left instanceof FieldReferenceExpression) {
+      lit = convertExpression(right);
       if (lit.isPresent()) {
-        return Optional.of(convertLR.apply(name, lit.get()));
+        return Optional.of(convertLR.apply(((FieldReferenceExpression) left).getName(), lit.get()));

Review Comment:
   I don't see a reason to remove the `name` variable in this block or the mirror one. That introduces needless changes. Can you roll that change back?



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org