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 2019/10/14 03:41:07 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #1501: fix duplicate initialize scope problem

danny0405 commented on a change in pull request #1501: fix duplicate initialize scope problem
URL: https://github.com/apache/calcite/pull/1501#discussion_r334319474
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
 ##########
 @@ -646,8 +646,8 @@ private boolean addOrExpandField(List<SqlNode> selectItems, Set<String> aliases,
   }
 
   public SqlNode validate(SqlNode topNode) {
-    SqlValidatorScope scope = new EmptyScope(this);
-    scope = new CatalogScope(scope, ImmutableList.of("CATALOG"));
+    SqlValidatorScope scope = new CatalogScope(new EmptyScope(this),
+            ImmutableList.of("CATALOG"));
 
 Review comment:
   What's the different between and after your patch, it seems the logic are equivalent.

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