mihaibudiu commented on code in PR #4033:
URL: https://github.com/apache/calcite/pull/4033#discussion_r1830005905
##########
core/src/test/java/org/apache/calcite/test/RelMetadataTest.java:
##########
@@ -2605,7 +2606,13 @@ private void checkPredicates(RelOptCluster cluster,
RelOptTable empTable,
final String sql = "select cast(null as integer) as a\n"
+ "union all\n"
+ "select 5 as a";
- final Union rel = (Union) sql(sql).toRel();
+ final Union rel = (Union) sql(sql)
+ .withFactory(a ->
+ a.withSqlToRelConfig(
Review Comment:
can you factor out this configuration into a single function to avoid
repeating this pattern?
##########
core/src/test/resources/sql/sub-query.iq:
##########
@@ -3452,9 +3452,8 @@ EnumerableCalc(expr#0..12=[{inputs}], expr#13=[0:BIGINT],
expr#14=[=($t8, $t13)]
EnumerableAggregate(group=[{}], agg#0=[COUNT()], agg#1=[COUNT($0)])
EnumerableValues(tuples=[[{ null }, { 7782 }]])
EnumerableSort(sort0=[$0], dir0=[ASC])
- EnumerableAggregate(group=[{0}], agg#0=[MIN($1)])
- EnumerableCalc(expr#0=[{inputs}], expr#1=[true], proj#0..1=[{exprs}])
- EnumerableValues(tuples=[[{ null }, { 7782 }]])
+ EnumerableCalc(expr#0=[{inputs}], expr#1=[true], proj#0..1=[{exprs}])
Review Comment:
do you know what happened to the aggregate?
##########
core/src/test/java/org/apache/calcite/tools/PlannerTest.java:
##########
@@ -452,11 +452,6 @@ private void emptyUnions32(UnionMergeRule... extraRules)
+ " EnumerableValues(tuples=[[{ 1 }]])\n"
+ " EnumerableValues(tuples=[[{ 2 }]])\n";
- checkUnionPruning("values(1)"
Review Comment:
what happened with this test?
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -3148,7 +3148,7 @@ private void
checkPushJoinThroughUnionOnRightDoesNotMatchSemiOrAntiJoin(JoinRelT
sql(sql)
.withRule(CoreRules.UNION_TO_VALUES)
.withInSubQueryThreshold(0)
- .check();
+ .checkUnchanged();
Review Comment:
it really looks like these tests are no longer testing this particular rule.
I am not sure what should be done about that.
--
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]