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/06/15 05:03:20 UTC

[GitHub] [calcite] amaliujia commented on a change in pull request #2025: [CALCITE-4033] Does not produce parenthesized table expressions for U…

amaliujia commented on a change in pull request #2025:
URL: https://github.com/apache/calcite/pull/2025#discussion_r439931545



##########
File path: core/src/main/java/org/apache/calcite/sql/SqlCall.java
##########
@@ -97,7 +97,13 @@ public void unparse(
     if (leftPrec > operator.getLeftPrec()
         || (operator.getRightPrec() <= rightPrec && (rightPrec != 0))
         || writer.isAlwaysUseParentheses() && isA(SqlKind.EXPRESSION)) {
-      final SqlWriter.Frame frame = writer.startList("(", ")");
+      final SqlWriter.Frame frame;
+      if (operator instanceof SqlUnnestOperator) {
+        frame = writer.startList(SqlWriter.FrameTypeEnum.SIMPLE);
+      } else {

Review comment:
       thanks Danny. I changed to another approach now (mark UNENST as not a expression).




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