godfreyhe commented on a change in pull request #13837:
URL: https://github.com/apache/flink/pull/13837#discussion_r514912075
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/FlinkBatchRuleSets.scala
##########
@@ -222,7 +222,8 @@ object FlinkBatchRuleSets {
val JOIN_COND_EQUAL_TRANSFER_RULES: RuleSet = RuleSets.ofList((
RuleSets.ofList(JoinConditionEqualityTransferRule.INSTANCE).asScala ++
PREDICATE_SIMPLIFY_EXPRESSION_RULES.asScala ++
- FILTER_RULES.asScala
+ FILTER_RULES.asScala ++
+ RuleSets.ofList(JoinDeriveNullFilterRule.INSTANCE).asScala
Review comment:
It's better we do not put `JoinDeriveNullFilterRule` into
`JOIN_COND_EQUAL_TRANSFER_RULES` collection, instead I suggest we can add a
program into `JOIN_REWRITE` stage after `JOIN_COND_EQUAL_TRANSFER_RULES`
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/common/JoinReorderTestBase.scala
##########
@@ -69,6 +70,27 @@ abstract class JoinReorderTestBase extends TableTestBase {
"b5" -> new ColumnStats(200L, 0L, 8.0, 8, null, null)
))).build())
+ util.addTableSource("T6", types, Array("a6", "b6", "c6"),
FlinkStatistic.builder()
+ .tableStats(new TableStats(500000L, Map(
+ "a6" -> new ColumnStats(200000L, 50000L, 4.0, 4, null, null),
+ "b6" -> new ColumnStats(100000L, 0L, 8.0, 8, null, null),
+ "c6" -> new ColumnStats(50000L, 20000L, 8.0, 8, null, null)
Review comment:
please do not use deprecated constructor
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/common/JoinReorderTestBase.scala
##########
@@ -69,6 +70,27 @@ abstract class JoinReorderTestBase extends TableTestBase {
"b5" -> new ColumnStats(200L, 0L, 8.0, 8, null, null)
))).build())
+ util.addTableSource("T6", types, Array("a6", "b6", "c6"),
FlinkStatistic.builder()
+ .tableStats(new TableStats(500000L, Map(
+ "a6" -> new ColumnStats(200000L, 50000L, 4.0, 4, null, null),
+ "b6" -> new ColumnStats(100000L, 0L, 8.0, 8, null, null),
+ "c6" -> new ColumnStats(50000L, 20000L, 8.0, 8, null, null)
+ ))).build())
+
+ util.addTableSource("T7", types, Array("a7", "b7", "c7"),
FlinkStatistic.builder()
+ .tableStats(new TableStats(500000L, Map(
+ "a7" -> new ColumnStats(200000L, 50000L, 4.0, 4, null, null),
+ "b7" -> new ColumnStats(100000L, 0L, 8.0, 8, null, null),
+ "c7" -> new ColumnStats(50000L, 20000L, 8.0, 8, null, null)
+ ))).build())
+
+ util.addTableSource("T8", types, Array("a8", "b8", "c8"),
FlinkStatistic.builder()
+ .tableStats(new TableStats(500000L, Map(
+ "a8" -> new ColumnStats(200000L, 50000L, 4.0, 4, null, null),
+ "b8" -> new ColumnStats(100000L, 0L, 8.0, 8, null, null),
+ "c8" -> new ColumnStats(50000L, 20000L, 8.0, 8, null, null)
+ ))).build())
Review comment:
if they are only used in one case, we can move them into the specific
test
----------------------------------------------------------------
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]