amaliujia commented on a change in pull request #1587: [CALCITE-3272] Support 
TUMBLE as Table Valued Function including an enumerable implementation, 
stream.iq and DESCRIPTOR
URL: https://github.com/apache/calcite/pull/1587#discussion_r350461579
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
 ##########
 @@ -2739,7 +2740,25 @@ private void registerQuery(
       registerOperandSubQueries(parentScope, call, 0);
       scopes.put(node, parentScope);
       break;
+    case TUMBLE:
 
 Review comment:
   Existing table functions' namespace building is top-down. In order to 
support DESCRIPTOR for TUMBLE, we need a bottom-up approach in which
   1. build scope of TABLE parameter first (which is a SqlSelect). 
   2. build namespace and use the scope of step 1 for TUMBLE.
   
   By doing, in the following validation steps, TUMBLE will have a right scope 
to allow it's operand (the descriptor) to solve the name. 
   
   If not doing this, the descriptor will only see an EmptyScope. 
   
   

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


With regards,
Apache Git Services

Reply via email to