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

 ##########
 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:
   I also think so.

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