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 2022/08/12 14:01:20 UTC

[GitHub] [calcite] rubenada commented on a diff in pull request #2789: [CALCITE-5126] Implicit column alias for single-column UNNEST should work with any single-column UNNEST’s input

rubenada commented on code in PR #2789:
URL: https://github.com/apache/calcite/pull/2789#discussion_r944495271


##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -2335,11 +2335,7 @@ private SqlNode registerFrom(
       expr = call.operand(0);
       final boolean needAlias = call.operandCount() > 2
           || expr.getKind() == SqlKind.VALUES
-          || expr.getKind() == SqlKind.UNNEST
-          && (((SqlCall) expr).operand(0).getKind()
-                  == SqlKind.ARRAY_VALUE_CONSTRUCTOR
-              || ((SqlCall) expr).operand(0).getKind()
-                  == SqlKind.MULTISET_VALUE_CONSTRUCTOR);
+          || expr.getKind() == SqlKind.UNNEST;

Review Comment:
   @julianhyde sorry to ping you directly.
   I think this PR looks in a good shape, I was just wondering if you have any problem or concern about this particular change, which alters a condition that you explicitly added in [c2527cc](https://github.com/apache/calcite/commit/c2527ccf440f7750bfbabd2063c402440c5b32a0).
   If you don't have any objection, I think we should move forward and merge the patch, wdyt?



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org