Github user manuzhang commented on a diff in the pull request:
https://github.com/apache/incubator-gearpump/pull/225#discussion_r139435394
--- Diff:
experiments/sql/src/test/java/org/apache/gearpump/sql/planner/CalciteTest.java
---
@@ -291,17 +290,25 @@ void calTest() throws SqlParseException {
cluster,
convertletTable);
RelRoot root = sqlToRelConverter.convertQuery(validatedSqlNode, false,
true);
- System.out.println(RelOptUtil.toString(root.rel));
+ // Check logical plan
+ String expectedResult = "LogicalProject(product_id=[$0],
product_name=[$1], order_id=[$2])" +
+ " LogicalFilter(condition=[>($3, 2)])" +
+ " LogicalProject(id=[$0], name=[$1], id1=[$3], quantity=[$4])" +
+ " LogicalJoin(condition=[=($2, $5)], joinType=[inner])" +
+ " LogicalProject(id=[$0], name=[$1], id0=[CAST($0):VARCHAR
CHARACTER SET \"ISO-8859-1\" COLLATE \"" +
+ "ISO-8859-1$en_US$primary\"])" +
+ " EnumerableTableScan(table=[[t, products]])" +
+ " LogicalProject(id=[$0], quantity=[$1],
id0=[CAST($0):VARCHAR CHARACTER SET \"ISO-8859-1\" COLLATE \"" +
+ "ISO-8859-1$en_US$primary\"])" +
+ " EnumerableTableScan(table=[[t, orders]])";
+ assertEquals(expectedResult,
--- End diff --
What's the usage of codes below this ?
---