You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/02/17 17:05:01 UTC

[GitHub] [calcite] my7ym commented on a change in pull request #1811: [CALCITE-3789] Support validation of UNNEST multiple array columns like Presto

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_r380292169
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql/validate/DelegatingScope.java
 ##########
 @@ -298,7 +298,11 @@ public SqlQualified fullyQualify(SqlIdentifier identifier) {
       for (; i > 0; i--) {
         final SqlIdentifier prefix = identifier.getComponent(0, i);
         resolved.clear();
-        resolve(prefix.names, nameMatcher, false, resolved);
+        resolve(
+            prefix.names,
+            nameMatcher,
+            validator.getConformance().allowAliasUnnestArrayColumns(),
+            resolved);
 
 Review comment:
   Sorry a little confused here. Here I am directly using conformance as the flag. I feel like it's more concise than an explicit flag like 
   
   SqlValidatorImpl.java::
   boolean allowAliasUnnestArrays = validator.getConformance().allowAliasUnnestArrayColumns;
   DelegatingScope.setAllowAliasUnnestArrays(allowAliasUnnestArrays);
   
   DeletatingScope.java::
   Just replace validator.getConformance().allowAliasUnnestArrayColumns with the explicit flag.
   
   And it seems using conformance in scope happens before. e.g. OrderByScope.

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


With regards,
Apache Git Services