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

HivePointLookupOptimizer should extract deep cases

    XMLWordPrintableJSON

Details

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

    Description

      currently IN extraction stops at the first level; as a result for the following query, the nested INs are not closed back.

      create table t(a integer);
      create table t2(b integer);
      
      insert into t values (1),(2),(3),(4);
      insert into t2 values (1),(2),(3),(4);
      
      explain
      select * from t,t2 where
      	a*a=b+3
      	and
      	a in (1,2,3,4)
      	and
      	b in (1,2,3,4)
      
      	and (
      		(a in (1,2) and b in (1,2) ) or 
      		(a in (2,3) and b in (2,3) )
      			)
      	;
      

      Attachments

        1. HIVE-20712.02.patch
          20 kB
          Zoltan Haindrich
        2. HIVE-20712.02.patch
          20 kB
          Zoltan Haindrich
        3. HIVE-20712.01.patch
          10 kB
          Zoltan Haindrich
        4. HIVE-20712.01.patch
          5 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: