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

SqlPrettyWriter doesn't respect alwaysUseParentheses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 1.11.0
    • None
    • core
    • 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

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

            Dates

              Created:
              Updated: