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

Simplifying a case statement's first branch should ignore its safety

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.19.0
    • None

    Description

      Example: a very simple CASE which is not get rewritten because the first condition branch contains an unknown UDF

      CASE
       WHEN to_date('2001-11-11') = '2000' THEN true
       ELSE false
      END
      

      This expression right now retained as is; because the "to_date" was an unknown UDF; but since the first branch of a CASE is always evaluated and that could unlock the rewrite of this case to it's boolean form.

      Attachments

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h