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

AS alias operator strips MEASUREness from measures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.36.0
    • 1.37.0
    • core

    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: