alex-plekhanov commented on a change in pull request #9208:
URL: https://github.com/apache/ignite/pull/9208#discussion_r662190031
##########
File path:
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/UnionPlannerTest.java
##########
@@ -131,21 +51,38 @@ public void testUnion() throws Exception {
"UNION " +
"SELECT * FROM table3 ";
- IgniteRel phys = physicalPlan(
- sql,
- publicSchema
- );
-
- System.out.println("+++ " + RelOptUtil.toString(phys));
-
- assertNotNull(phys);
+ assertPlan(sql, publicSchema,
isInstanceOf(IgniteReduceAggregateBase.class)
+ .and(hasChildThat(isInstanceOf(Union.class)
+ .and(input(0,
isTableScan(((TestTable)publicSchema.getTable("TABLE1")).name()))
Review comment:
Let's change `isTableScanMethod` like this:
`scanTableName = Util.last(n.getTable().getQualifiedName());`
And use "TABLE1", "TABLE2", etc here.
##########
File path:
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/UnionPlannerTest.java
##########
@@ -131,21 +51,38 @@ public void testUnion() throws Exception {
"UNION " +
"SELECT * FROM table3 ";
- IgniteRel phys = physicalPlan(
- sql,
- publicSchema
- );
-
- System.out.println("+++ " + RelOptUtil.toString(phys));
-
- assertNotNull(phys);
+ assertPlan(sql, publicSchema,
isInstanceOf(IgniteReduceAggregateBase.class)
+ .and(hasChildThat(isInstanceOf(Union.class)
+ .and(input(0,
isTableScan(((TestTable)publicSchema.getTable("TABLE1")).name()))
+ .and(input(1,
isTableScan(((TestTable)publicSchema.getTable("TABLE2")).name())))
Review comment:
Use `and` predicate after another `and` predicate (not after `input`
predicate), this will align brackets and will be more readable.
--
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]