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

Deprecating ExprSimplifier causes some operands not being simplified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • core
    • None

    Description

      This might not be a bug or the original intention of CALCITE-2726 since it is not part of the PR.
      The reduction of ExprSimplifier (RexShuttle) actually causes some of the chained operations not being simplified. For example:

      AS(
        +(
          someAggFunc($2, $0), 
          CAST(1):BIGINT NOT NULL
          ),
        someName'
      )
      

      Somehow did not get simplified (e.g. the CAST(1) still remains instead of being simplified as a Literal.

      My initial feeling is that AS is not one of the kinds in the case-switch code in RexSimplify.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rongr Rong Rong
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: