libenchao commented on code in PR #2952:
URL: https://github.com/apache/calcite/pull/2952#discussion_r1012589384


##########
core/src/main/java/org/apache/calcite/sql/SqlWithItem.java:
##########
@@ -97,7 +97,7 @@ private static class SqlWithItemOperator extends 
SqlSpecialOperator {
         withItem.columnList.unparse(writer, getLeftPrec(), getRightPrec());
       }
       writer.keyword("AS");
-      withItem.query.unparse(writer, 10, 10);
+      withItem.query.unparse(writer, 100, 100);

Review Comment:
   > I think "leftPrec: 100, rightPrec: 100" is a agreement or a habit in 
Calcite project to indicate that it's a high enough priority.
   
   I'm not sure about this, and that's why I don't like current approach. I 
know in 
https://github.com/apache/calcite/blob/b36e4a4ac2cf194eab89cc5c782a3377eff59732/core/src/main/java/org/apache/calcite/sql/SqlOperator.java#L86
 , we assume the highest priority is `200`, but I don't know anywhere we are 
assuming that `100` is high enough.



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