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

Ensure that AS operator (column alias) doesn't change return type of measures

    XMLWordPrintableJSON

Details

    Description

      CALCITE-5869 introduced a change which removes MEASURE when inferring the return type when an operator is applied.

      The AS keyword for aliases is implemented as an operator in the SQL AST. Using AS removes MEASURE when typing expressions that have an alias in the SELECT clause.

      Thus, the type of SELECT m and SELECT m AS m are different when m is a measure. This is not desirable.

      Proposed fix: don't change type when using the AS operator.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              barrkel Barry Kelly
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: