Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22253 General task tracking improvements for materialized views
  3. HIVE-22258

Rewriting fails for `IN` clauses in MV and query when we use equals or subset in the query

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.0.0
    • Component/s: CBO, Materialized views
    • Labels:
      None

      Description

      ...as stated in title.  Script is attached.  The issue can be seen with these queries:

       

      create materialized view av1 stored as orc as select state, year, sum(population) from census_pop where year IN (2010, 2018) group by state, year;

      – this is ok

      explain extended select state, year, sum(population) from census_pop where year IN (2010, 2018) group by state, year;

      – this is not ok

      explain extended select state, year, sum(population) from census_pop where year = 2010 group by state, year;

      – this is not ok

      explain extended select state, year, sum(population) from census_pop where year in (2010) group by state, year;

        Attachments

        1. in-pred.sql
          1 kB
          Steve Carlin

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                scarlin Steve Carlin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: