[ 
https://issues.apache.org/jira/browse/CALCITE-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15827443#comment-15827443
 ] 

Julian Hyde commented on CALCITE-1585:
--------------------------------------

Maybe we should deprecate the two constructors that have a {{boolean 
alwaysUseParentheses}} parameter, since that parameter is always ignored. 
There's only one place in Calcite that uses one of those constructors.

> SqlPrettyWriter doesn't respect alwaysUseParentheses
> ----------------------------------------------------
>
>                 Key: CALCITE-1585
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1585
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.11.0
>            Reporter: Jess Balint
>            Assignee: Julian Hyde
>            Priority: Trivial
>
> The {{SqlPrettyWriter}} constructor is as follows:
> {code}
>   public SqlPrettyWriter(
>       SqlDialect dialect,
>       boolean alwaysUseParentheses,
>       PrintWriter pw) {
>     if (pw == null) {
>       pw = new PrintWriter(sw);
>     }
>     this.pw = pw;
>     this.dialect = dialect;
>     this.alwaysUseParentheses = alwaysUseParentheses;
>     resetSettings();
>     reset();
>   }
> {code}
> The {{resetSettings()}} method overrides {{this.alwaysUseParentheses}} to 
> FALSE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to