l4wei commented on code in PR #2938:
URL: https://github.com/apache/calcite/pull/2938#discussion_r996592477
##########
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)
|| (frame.frameType == FrameTypeEnum.SETOP);
}
+ @Override public boolean inWithBody() {
+ return frame != null && frame.frameType == FrameTypeEnum.WITH_BODY;
Review Comment:
Maybe not, NPE will be thrown on some unit tests, e.g.
`SqlParserTest#testNewSpecification`.
--
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]