[ 
https://issues.apache.org/jira/browse/HIVE-26762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alessandro Solimando updated HIVE-26762:
----------------------------------------
    Description: 
HiveFilterSetOpTransposeRule, when applied to UNION ALL operands, checks if the 
newly pushed filter simplifies to FALSE (possibly due to the predicates holding 
on the input).

If this is true and there is more than one UNION ALL operand, it gets pruned.

After HIVE-26524 ("Use Calcite to remove sections of a query plan known never 
produces rows"), this is possibly redundant and we could drop this feature and 
let the other rules take care of the pruning.

In such a case, it might be even possible to drop the Hive specific rule and 
relies on the Calcite one (the difference is just the operand pruning at the 
moment of writing), similarly to what HIVE-26642 did for 
HiveReduceExpressionRule. Writing it here as a reminder, but it's recommended 
to tackle this in a separate ticket after verifying that is feasible.

  was:
HiveFilterSetOpTransposeRule, when applied to UNION ALL operands, checks if the 
newly pushed filter simplifies to FALSE (possibly due to the predicates holding 
on the input).

If this is true and there is more than one UNION ALL operand, it gets pruned.

After HIVE-26524 ("Use Calcite to remove sections of a query plan known never 
produces rows"), this is possibly redundant and we could drop this feature and 
let the other rules take care of the pruning.

In such a case, it's even possible to drop the Hive specific rule and relies on 
the Calcite one (the difference is just the operand pruning at the moment of 
writing), similarly to what HIVE-26642 did for HiveReduceExpressionRule.


> Remove operand pruning in HiveFilterSetOpTransposeRule
> ------------------------------------------------------
>
>                 Key: HIVE-26762
>                 URL: https://issues.apache.org/jira/browse/HIVE-26762
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO, Query Planning
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Alessandro Solimando
>            Priority: Major
>
> HiveFilterSetOpTransposeRule, when applied to UNION ALL operands, checks if 
> the newly pushed filter simplifies to FALSE (possibly due to the predicates 
> holding on the input).
> If this is true and there is more than one UNION ALL operand, it gets pruned.
> After HIVE-26524 ("Use Calcite to remove sections of a query plan known never 
> produces rows"), this is possibly redundant and we could drop this feature 
> and let the other rules take care of the pruning.
> In such a case, it might be even possible to drop the Hive specific rule and 
> relies on the Calcite one (the difference is just the operand pruning at the 
> moment of writing), similarly to what HIVE-26642 did for 
> HiveReduceExpressionRule. Writing it here as a reminder, but it's recommended 
> to tackle this in a separate ticket after verifying that is feasible.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to