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/05/18 13:08:00 UTC

[jira] [Work logged] (HIVE-26238) Decouple sort filter predicates optimization from digest normalization in CBO

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

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

                Author: ASF GitHub Bot
            Created on: 18/May/22 13:07
            Start Date: 18/May/22 13:07
    Worklog Time Spent: 10m 
      Work Description: zabetak opened a new pull request, #3299:
URL: https://github.com/apache/hive/pull/3299

   ### What changes were proposed in this pull request and why?
   1. Decouple sort filter optimization from digest normalization by refactoring `HiveSortFilterPredicates` into a (DFS) visitor. We cannot use planner or rules cause they make use of digest. Performing this optimization using a visitor slightly simplifies the code since there is no need to have a registry since we are not going to visit a node twice.
   
   2. Move the optimization after all post-join transformations to avoid having other optimizations cancel the benefit of the sort filter predicates. As shown by the plan changes here, now we can see some additional cases where the optimization is effective and wasn't done previously.
   
   ### Does this PR introduce _any_ user-facing change?
   Possibly more efficient plan in certain cases.
   
   ### How was this patch tested?
   Existing CBO tests by enabling (https://github.com/apache/hive/commit/0091373bdcbd6445f4aaa359801a2ea2276e3db7), disabling (https://github.com/apache/hive/commit/7567730c66523a89d5fe13af723e6b252d8f89f7) normalization and checking plan changes.




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

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

> Decouple sort filter predicates optimization from digest normalization in CBO
> -----------------------------------------------------------------------------
>
>                 Key: HIVE-26238
>                 URL: https://issues.apache.org/jira/browse/HIVE-26238
>             Project: Hive
>          Issue Type: Improvement
>          Components: CBO
>    Affects Versions: 4.0.0-alpha-1
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> HIVE-21857 introduced an optimization for ordering predicates inside a filter based on a cost function. After HIVE-23456, this optimization can run only if the the digest normalization (introduced in CALCITE-2450) in CBO is disabled (via {{calcite.enable.rexnode.digest.normalize}}).
> The goal of this issue is to decouple the sort predicate optimization from digest normalization. After the changes here the optimization shouldn't be affected by the value of {{calcite.enable.rexnode.digest.normalize}} property.



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