KurtYoung commented on a change in pull request #8468:
[FLINK-12399][table][table-planner] Fix FilterableTableSource does not change
after applyPredicate
URL: https://github.com/apache/flink/pull/8468#discussion_r333526438
##########
File path:
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/logical/PushFilterIntoTableSourceScanRule.scala
##########
@@ -83,6 +84,14 @@ class PushFilterIntoTableSourceScanRule extends RelOptRule(
val newTableSource = filterableSource.applyPredicate(remainingPredicates)
+ if (remainingPredicates.size() > 0
+ &&
newTableSource.asInstanceOf[FilterableTableSource[_]].isFilterPushedDown
+ &&
newTableSource.explainSource().equals(scan.tableSource.explainSource())) {
+ throw new TableException("Failed to push filter into table source! "
Review comment:
I think throw exception is fine, since it's not easy to see the logs which
generated during optimization.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services