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/02/23 05:59:08 UTC

[GitHub] [calcite] JiajunBernoulli commented on a change in pull request #2724: [CACLITE-5013] Retain parentheses if a setop has an LIMIT clause

JiajunBernoulli commented on a change in pull request #2724:
URL: https://github.com/apache/calcite/pull/2724#discussion_r812579519



##########
File path: core/src/main/java/org/apache/calcite/sql/SqlUtil.java
##########
@@ -417,24 +418,52 @@ public static void unparseSqlIdentifierSyntax(
     writer.endList(frame);
   }
 
+  private static void unparseSetOpSyntax(

Review comment:
       Ok, I've added a doc to explain it.

##########
File path: core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
##########
@@ -3301,6 +3301,85 @@ private void checkHavingAliasSameAsColumn(boolean upperAlias) {
     sql(query).ok(expected);
   }
 
+  @Test void testSetOpLimitShouldRetainParentheses() {

Review comment:
       I changed it, but I'm a little confused about how to choose case. 
   In `testUnionWrappedInASelect` and `testAliasOnStarNoExcessQuotes`, sql keywords is lowercase.




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