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

Aggregate pushdown through join may generate additional rewriting opportunities

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • CBO, Materialized views
    • None

    Description

      In this case, there is a function used in the query and materialized view, but the aggregate is not being pushed down.  Script is attached.

      Example query and materialized view:

      create materialized view av1 stored as orc as select fk1, fk2, fk3, to_date(fk4), sum(1) from fact group by 1, 2, 3, 4;

      explain cbo select pk1, dim2.fk4, sum(1), count(c1)

      from fact, dim2

      where to_date(fact.fk4) = dim2.fk4

      group by 1, 2

      order by 1, 2;

      Attachments

        1. eager-v2.sql
          1 kB
          Steve Carlin

        Activity

          People

            vgarg Vineet Garg
            scarlin Steve Carlin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: