Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1585

SqlPrettyWriter doesn't respect alwaysUseParentheses

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.11.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      The SqlPrettyWriter constructor is as follows:

        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();
        }
      

      The resetSettings() method overrides this.alwaysUseParentheses to FALSE.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jbalint@gmail.com Jess Balint
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: