You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2018/12/02 00:54:56 UTC
[04/15] calcite git commit: [CALCITE-2632] Ensure that RexNode and
its sub-classes implement hashCode and equals methods (Zoltan Haindrich)
http://git-wip-us.apache.org/repos/asf/calcite/blob/847e76cd/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml b/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
index 4f5b8d9..c218e7c 100644
--- a/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
+++ b/core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
@@ -1846,29 +1846,22 @@ from (select 2+deptno d2, 3+deptno d3 from emp) e
<Resource name="plan">
<![CDATA[
LogicalProject(D2=[$0], D3=[$1])
- LogicalProject(D2=[$0], D3=[$1], D1=[CAST($2):INTEGER], D30=[$3], $f2=[CAST($4):BOOLEAN])
+ LogicalProject(D2=[$0], D3=[$1], D1=[CAST($2):INTEGER], D6=[$3], $f2=[CAST($4):BOOLEAN])
LogicalJoin(condition=[AND(=($0, $2), =($1, $3))], joinType=[inner])
LogicalProject(D2=[+(2, $7)], D3=[+(3, $7)])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalAggregate(group=[{0, 1}], agg#0=[MIN($2)])
- LogicalProject(D1=[$0], D3=[$2], $f0=[true])
+ LogicalProject(D1=[$0], D6=[$2], $f0=[true])
LogicalFilter(condition=[IS NOT NULL($1)])
- LogicalProject(D1=[$0], $f0=[$3], D3=[$2])
+ LogicalProject(D1=[$0], $f0=[$3], D6=[$2])
LogicalJoin(condition=[=($0, $1)], joinType=[left])
LogicalProject(D1=[+($0, 1)])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
LogicalAggregate(group=[{0, 1}], agg#0=[MIN($2)])
- LogicalProject(D1=[$3], D3=[$4], $f0=[true])
- LogicalJoin(condition=[AND(=($0, $3), =($1, $3), =($2, $4))], joinType=[inner])
+ LogicalProject(D4=[$0], D6=[$2], $f0=[true])
+ LogicalFilter(condition=[=($1, $0)])
LogicalProject(D4=[+($0, 4)], D5=[+($0, 5)], D6=[+($0, 6)])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
- LogicalJoin(condition=[true], joinType=[inner])
- LogicalAggregate(group=[{0}])
- LogicalProject(D1=[+($0, 1)])
- LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
- LogicalAggregate(group=[{0}])
- LogicalProject(D3=[+(3, $7)])
- LogicalTableScan(table=[[CATALOG, SALES, EMP]])
]]>
</Resource>
</TestCase>
@@ -4778,29 +4771,22 @@ from (select 2+deptno d2, 3+deptno d3 from emp) e
<Resource name="plan">
<![CDATA[
LogicalProject(D2=[$0], D3=[$1])
- LogicalProject(D2=[$0], D3=[$1], D1=[CAST($2):INTEGER], D30=[$3], $f2=[CAST($4):BOOLEAN])
+ LogicalProject(D2=[$0], D3=[$1], D1=[CAST($2):INTEGER], D6=[$3], $f2=[CAST($4):BOOLEAN])
LogicalJoin(condition=[AND(=($0, $2), =($1, $3))], joinType=[inner])
LogicalProject(D2=[+(2, $7)], D3=[+(3, $7)])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalAggregate(group=[{0, 1}], agg#0=[MIN($2)])
- LogicalProject(D1=[$0], D3=[$2], $f0=[true])
+ LogicalProject(D1=[$0], D6=[$2], $f0=[true])
LogicalFilter(condition=[IS NOT NULL($1)])
- LogicalProject(D1=[$0], $f0=[$3], D3=[$2])
+ LogicalProject(D1=[$0], $f0=[$3], D6=[$2])
LogicalJoin(condition=[=($0, $1)], joinType=[left])
LogicalProject(D1=[+($0, 1)])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
LogicalAggregate(group=[{0, 1}], agg#0=[MIN($2)])
- LogicalProject(D1=[$3], D3=[$4], $f0=[true])
- LogicalJoin(condition=[AND(=($0, $3), =($1, $3), =($2, $4))], joinType=[inner])
+ LogicalProject(D4=[$0], D6=[$2], $f0=[true])
+ LogicalFilter(condition=[=($1, $0)])
LogicalProject(D4=[+($0, 4)], D5=[+($0, 5)], D6=[+($0, 6)])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
- LogicalJoin(condition=[true], joinType=[inner])
- LogicalAggregate(group=[{0}])
- LogicalProject(D1=[+($0, 1)])
- LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
- LogicalAggregate(group=[{0}])
- LogicalProject(D3=[+(3, $7)])
- LogicalTableScan(table=[[CATALOG, SALES, EMP]])
]]>
</Resource>
</TestCase>
http://git-wip-us.apache.org/repos/asf/calcite/blob/847e76cd/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchRules.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchRules.java b/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchRules.java
index b442ddd..311f9bc 100644
--- a/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchRules.java
+++ b/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchRules.java
@@ -149,8 +149,8 @@ class ElasticsearchRules {
return stripQuotes(strings.get(0)) + "[" + ((RexLiteral) op1).getValue2() + "]";
}
}
- throw new IllegalArgumentException("Translation of " + call.toString()
- + " is not supported by ElasticsearchProject");
+ throw new IllegalArgumentException("Translation of " + call
+ + " is not supported by ElasticsearchProject");
}
List<String> visitList(List<RexNode> list) {