snuyanzin commented on code in PR #28162:
URL: https://github.com/apache/flink/pull/28162#discussion_r3325372625
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/abilities/source/MetadataFilterPushDownSpec.java:
##########
@@ -78,23 +80,57 @@ public List<RexNode> getPredicates() {
@Override
public void apply(DynamicTableSource tableSource, SourceAbilityContext
context) {
- // Use stored predicateRowType; context's row type may be narrowed by
ProjectPushDownSpec.
- MetadataFilterResult result =
- applyMetadataFilters(predicates, predicateRowType,
tableSource, context);
- if (result.getAcceptedFilters().size() != predicates.size()) {
- throw new TableException("All metadata predicates should be
accepted here.");
+ List<ResolvedExpression> resolved =
+ resolvedExpressions(predicates, predicateRowType, tableSource,
context);
+ MetadataFilterResult result =
applyMetadataFiltersOnSource(tableSource, resolved);
+ // On restore every predicate must round-trip back via instance
identity. `remaining`
+ // is not validated: the spec only stores already-accepted predicates,
so the source
+ // should re-accept them all.
+ Set<ResolvedExpression> accepted = Sets.newIdentityHashSet();
Review Comment:
instead of heavy sets can we use Calcite's `ImmutableBitSet`?
--
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]