You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jess Balint (JIRA)" <ji...@apache.org> on 2017/01/18 02:56:26 UTC

[jira] [Created] (CALCITE-1585) SqlPrettyWriter doesn't respect alwaysUseParentheses

Jess Balint created CALCITE-1585:
------------------------------------

             Summary: SqlPrettyWriter doesn't respect alwaysUseParentheses
                 Key: CALCITE-1585
                 URL: https://issues.apache.org/jira/browse/CALCITE-1585
             Project: Calcite
          Issue Type: Bug
          Components: core
            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)