You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/06/14 07:44:01 UTC

[jira] [Work logged] (HIVE-25240) Query Text based MaterializedView rewrite of subqueries

     [ https://issues.apache.org/jira/browse/HIVE-25240?focusedWorklogId=610362&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-610362 ]

ASF GitHub Bot logged work on HIVE-25240:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Jun/21 07:43
            Start Date: 14/Jun/21 07:43
    Worklog Time Spent: 10m 
      Work Description: kasakrisz opened a new pull request #2387:
URL: https://github.com/apache/hive/pull/2387


   ### What changes were proposed in this pull request?
   1. Generate expanded query text of subqueries and use it to lookup materializations.
   2. If materialization exists replace the subquery Calcite plan with materialized view scan.
   
   ### Why are the changes needed?
   Improve query text based materialized view query rewrite.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. `Explain` and `Explain cbo` output can change.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=materialized_view_rewrite_by_text_8.q,materialized_view_rewrite_by_text_7.q,materialized_view_rewrite_by_text_6.q -pl itests/qtest -Pitests
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 610362)
    Remaining Estimate: 0h
            Time Spent: 10m

> Query Text based MaterializedView rewrite of subqueries
> -------------------------------------------------------
>
>                 Key: HIVE-25240
>                 URL: https://issues.apache.org/jira/browse/HIVE-25240
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: CBO, materializedviews
>             Fix For: 4.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code}
> create materialized view mat1 as
> select col0 from t1 where col0 > 1;
> explain cbo
> select col0 from
>   (select col0 from t1 where col0 > 1) sub
> where col0 = 10;
> {code}
> {code}
> HiveProject(col0=[CAST(10):INTEGER])
>   HiveFilter(condition=[=($0, 10)])
>     HiveTableScan(table=[[default, mat1]], table:alias=[default.mat1])
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)