tanclary commented on code in PR #3688:
URL: https://github.com/apache/calcite/pull/3688#discussion_r1498378372


##########
core/src/main/java/org/apache/calcite/sql/validate/IdentifierNamespace.java:
##########
@@ -187,33 +188,31 @@ private SqlValidatorNamespace resolveImpl(SqlIdentifier 
id) {
 
   @Override public RelDataType validateImpl(RelDataType targetRowType) {
     resolvedNamespace = resolveImpl(id);
-    if (resolvedNamespace instanceof TableNamespace) {
-      SqlValidatorTable table = ((TableNamespace) 
resolvedNamespace).getTable();
-      if (validator.config().identifierExpansion()) {
+    validator.validateNamespace(resolvedNamespace, targetRowType);
+
+    if (validator.config().identifierExpansion()) {
+      SqlValidatorTable table = resolvedNamespace.getTable();
+      if (table != null) {

Review Comment:
   It's hard to tell on github but could we remove a level of nesting if we 
change this to `if (table == null) { break; }`?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to