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

Improve HivePointLookupOptimizerRule to be able to extract from more sophisticated contexts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • Logical Optimizer
    • None

    Description

      Currently it could handle conditions in the form:

      ( ( a=1 && b=1 && ... ) || (a=2 && b=2 && ...) || ... )
      

      If there is some noise somewhere in the or like:

      ( x=18 || ( a=1 && b=1 && ... ) || (a=2 && b=2 && ...) || ... )
      

      it stops processing.

      https://github.com/apache/hive/blob/2cabb8da150b8fb980223fbd6c2c93b842ca3ee5/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HivePointLookupOptimizerRule.java#L238

      HIVE-19097 right now unwinds some ors which can't be packed back; like query15
      https://github.com/apache/hive/blob/2cabb8da150b8fb980223fbd6c2c93b842ca3ee5/ql/src/test/queries/clientpositive/perf/query15.q#L14

      Attachments

        1. HIVE-20296.01.patch
          47 kB
          Zoltan Haindrich
        2. HIVE-20296.01wip01.patch
          22 kB
          Zoltan Haindrich
        3. HIVE-20296.01wip02.patch
          29 kB
          Zoltan Haindrich
        4. HIVE-20296.01wip03.patch
          47 kB
          Zoltan Haindrich
        5. HIVE-20296.02.patch
          47 kB
          Zoltan Haindrich
        6. HIVE-20296.02.patch
          47 kB
          Zoltan Haindrich
        7. HIVE-20296.03.patch
          47 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: