snuyanzin commented on code in PR #28162:
URL: https://github.com/apache/flink/pull/28162#discussion_r3304678862
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/abilities/source/FilterPushDownSpec.java:
##########
@@ -160,7 +197,21 @@ static List<ResolvedExpression> resolvePredicates(
"SQL expression parsing is not
supported at this location.");
})
.build();
- return resolver.resolve(filters);
+ List<ResolvedExpression> resolved = resolver.resolve(filters);
+ if (resolved.size() != predicates.size()) {
+ throw new TableException(
+ String.format(
+ "Internal error: ExpressionResolver returned %d
resolved expressions "
+ + "for %d input predicates.",
+ resolved.size(), predicates.size()));
+ }
+ // Identity-keyed map: callers will look up resolved expressions
returned by the source by
+ // instance equality, not by ResolvedExpression.equals (which can be
lossy across rebuilds).
+ Map<ResolvedExpression, RexNode> reverseMap = new IdentityHashMap<>();
Review Comment:
since there are a variety of `IdentityHashMap`: how will it behave for the
case of multiple predicates with same content? Do we have tests for such cases?
--
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]