my7ym commented on a change in pull request #1811: [CALCITE-3789] Support 
validation of UNNEST multiple array columns like Presto
URL: https://github.com/apache/calcite/pull/1811#discussion_r403815168
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
 ##########
 @@ -2047,8 +2047,15 @@ protected void convertFrom(
 
     case AS:
       call = (SqlCall) from;
-      convertFrom(bb, call.operand(0));
-      if (call.operandCount() > 2
+      SqlNode firstOperand = call.operand(0);
+
+      if (firstOperand.getKind() == SqlKind.UNNEST) {
+        convertUnnest(bb, (SqlCall) firstOperand, getFieldAliases(call));
+      } else {
+        convertFrom(bb, firstOperand);
+      }
 
 Review comment:
   @danny0405 I don't quite get your point. If you are talking about the 
decorrelate, I will fix it. But this part of change is not about decorrelate. 
Could you elaborate more on how does your fix work in more detail? If it's a 
fundamental change, could you please post it in the ticket too? I will also 
describe my plan there. Thanks.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to