You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2025/12/18 15:14:00 UTC

[jira] [Commented] (HIVE-29380) Drop synthetic HiveProject and HiveFilterProjectTSTransposeRule

    [ https://issues.apache.org/jira/browse/HIVE-29380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046351#comment-18046351 ] 

Stamatis Zampetakis commented on HIVE-29380:
--------------------------------------------

The presence of specialized "synthetic" projections complicates potential improvements on common table expression detection. I discovered this issue while working on generating smarter suggestions for TPC-DS Q9 in HIVE-29374.

> Drop synthetic HiveProject and HiveFilterProjectTSTransposeRule
> ---------------------------------------------------------------
>
>                 Key: HIVE-29380
>                 URL: https://issues.apache.org/jira/browse/HIVE-29380
>             Project: Hive
>          Issue Type: Task
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>
> The [synthetic indicator in HiveProject|https://github.com/apache/hive/blob/ee7138bf7a1a1ee1de07fa2243fe947a627268cb/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveProject.java#L49] was introduced alongside HiveFilterProjectTSTransposeRule in HIVE-11110 as way to restrict the application of project pushdown (PPD) to a limited number of cases. The rule was made to apply only on projections directly over a table scan that have been introduced after field trimming.
> In fact, the synthetic indicator is completely redundant since if we restrict the rule matches strictly to projections over table scans we can have the same outcome without the need to maintain an explicit indicator that specializes the behavior of the projection operator.
> Dropping the redundant logic and rule reduces code maintenance and tech-debt and facilitates the detection of equivalent expressions/plans since there are no multiple versions of a project operator.



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