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 2022/04/21 07:37:00 UTC

[jira] [Work logged] (HIVE-26160) Materialized View rewrite does not check tables scanned in sub-query expressions

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

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

                Author: ASF GitHub Bot
            Created on: 21/Apr/22 07:36
            Start Date: 21/Apr/22 07:36
    Worklog Time Spent: 10m 
      Work Description: kasakrisz opened a new pull request, #3229:
URL: https://github.com/apache/hive/pull/3229

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   Traverse the expressions in `Project` and `Filter` operators in CBO plan when collecting tables used.
   
   ### Why are the changes needed?
   For Materialized View rewrite based on exact sql text match Hive uses the initial CBO plan which may contains subquery expressions.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. If a query plan was rewritten to scan an outdated MV the results can be different.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=materialized_view_rewrite_by_text_9.q -pl itests/qtest -Pitests
   ```




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

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

> Materialized View rewrite does not check tables scanned in sub-query expressions
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-26160
>                 URL: https://issues.apache.org/jira/browse/HIVE-26160
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO, Materialized views
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Materialized View rewrite based on exact sql text match uses the initial CBO plan to explore possibilities to change the query plan or part of the plan to an MV scan.
> This algorithm requires the tables scanned by the original query plan. If the query contains sub query expressions the tables scanned by the sub query are not listed which can lead to rewrite the original plan to scan an outdated MV.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)