godfreyhe commented on a change in pull request #12866: URL: https://github.com/apache/flink/pull/12866#discussion_r454768224
########## File path: flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesTableFactory.java ########## @@ -540,40 +541,55 @@ private boolean isRetainedAfterApplyingFilterPredicates(Row row) { private boolean binaryFilterApplies(CallExpression binExpr, Row row) { List<Expression> children = binExpr.getChildren(); Preconditions.checkArgument(children.size() == 2); - Comparable lhsValue = getValue(children.get(0), row); - Comparable rhsValue = getValue(children.get(1), row); - FunctionDefinition functionDefinition = binExpr.getFunctionDefinition(); + Object lhsValue = getValue(children.get(0), row); + Object rhsValue = getValue(children.get(1), row); + // validate that literal is comparable + if (!isComparable(lhsValue, binExpr) || !isComparable(rhsValue, binExpr)) { Review comment: how about check whether the type of a field is comparable in `shouldPushDownUnaryExpression` method ? then the logic of `binaryFilterApplies` need not to change ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org