hannerwang commented on a change in pull request #2408:
URL: https://github.com/apache/calcite/pull/2408#discussion_r621757009



##########
File path: 
core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
##########
@@ -86,16 +86,19 @@ LogicalAggregate(group=[{0}])
             <![CDATA[select empno as d from emp group by d]]>
         </Resource>
     </TestCase>
-    <TestCase name="testGroupByAliasEqualToColumnName">
+    <TestCase name="testGroupByAliasEqualToMultipleColumnName">
         <Resource name="plan">
             <![CDATA[
 LogicalAggregate(group=[{0, 1}])
-  LogicalProject(EMPNO=[$0], DEPTNO=[$1])
-    LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+  LogicalProject(EMPNO=[$0], DEPTNO=[$7])
+    LogicalJoin(condition=[true], joinType=[inner])
+      LogicalTableScan(table=[[CATALOG, SALES, EMP]])
+      LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
 ]]>
         </Resource>
         <Resource name="sql">
-            <![CDATA[select empno, ename as deptno from emp group by empno, 
deptno]]>
+            <![CDATA[select empno, case when emp.deptno is null then 
dept.deptno else emp.deptno
+end as deptno from emp, dept group by empno, deptno]]>
         </Resource>

Review comment:
       thanks for reviewing, the strategy that alias will be substituted has 
changed, so the case should be changed also.




-- 
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]


Reply via email to