godfreyhe commented on a change in pull request #15641:
URL: https://github.com/apache/flink/pull/15641#discussion_r614631073
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdFilteredColumnInterval.scala
##########
@@ -132,11 +143,12 @@ class FlinkRelMdFilteredColumnInterval private extends
MetadataHandler[FilteredC
} else {
val filterRef = calc.getProgram.getProjectList.get(filterArg)
val condition = calc.getProgram.expandLocalRef(filterRef)
+ val columnRef = calc.getProgram.getProjectList.get(columnIndex).getIndex
Review comment:
we need the similar logic with Project ? (should use the ref index of
expandLocalRef result)
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdFilteredColumnInterval.scala
##########
@@ -236,7 +248,9 @@ class FlinkRelMdFilteredColumnInterval private extends
MetadataHandler[FilteredC
mq: RelMetadataQuery,
columnIndex: Int,
filterArg: Int): ValueInterval = {
- checkArgument(filterArg == -1)
+ if (filterArg != -1) {
Review comment:
please add a test case to cover this 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:
[email protected]