Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21152

Rewrite if expression to case and recognize simple case as an if

    XMLWordPrintableJSON

Details

    Description

      • IF is not part of the sql standard; however given its special form its simpler - and currently in Hive it also has vectorized support
      • people writing standard sql may write: CASE WHEN member=1 THEN attr+1 else attr+2 END which is essentially an if.

      The idea is to rewrite IFs to CASEs for the cbo; and recognize simple "CASE"-s as IFs to get vectorization on them if possible

      Attachments

        1. HIVE-21152.01.patch
          4 kB
          Zoltan Haindrich
        2. HIVE-21152.02.patch
          587 kB
          Zoltan Haindrich
        3. HIVE-21152.03.patch
          655 kB
          Zoltan Haindrich
        4. HIVE-21152.04.patch
          656 kB
          Zoltan Haindrich
        5. HIVE-21152.05.patch
          661 kB
          Zoltan Haindrich
        6. HIVE-21152.06.patch
          695 kB
          Zoltan Haindrich
        7. HIVE-21152.07.patch
          736 kB
          Zoltan Haindrich

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 - 20m
                  20m