l4wei commented on code in PR #2938:
URL: https://github.com/apache/calcite/pull/2938#discussion_r1002851565


##########
core/src/main/java/org/apache/calcite/sql/pretty/SqlPrettyWriter.java:
##########
@@ -398,10 +398,14 @@ public void setWindowDeclListNewline(boolean 
windowDeclListNewline) {
     return (frame == null)
         || (frame.frameType == FrameTypeEnum.SELECT)
         || (frame.frameType == FrameTypeEnum.ORDER_BY)
-        || (frame.frameType == FrameTypeEnum.WITH)
+        || (frame.frameType == FrameTypeEnum.WITH_BODY)

Review Comment:
   Actually, I think I have not extended the meaning of `SqlWriter#inQuery`. 
Current java doc: "Returns whether we are currently in a query context" is 
still appropriate now. Before this PR, `inQuery` covers "in WITH", I think 
"WITH" operator should be split into two operators: WITH_ITEM and WITH_BODY, so 
I change "WITH" to "WITH_BODY", that's the only change on this method.



-- 
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-unsubscr...@calcite.apache.org

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

Reply via email to