apache / apache/gluten

[Core] Refactoring the pre/post projection logic based on Spark Rule

Open
#4,213 12 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 14h
Merged PRs (30d)
80

Description

### Description

Due to the limitation that only the project operator in the native engine supports evaluating expressions, there is currently a lot of code logic in the transformer to handle inputs with expressions. To address this, we can refactor the code by unifying the handling logic using Spark Rule. We can extract the pre/post projection logic from transformers like agg, sort, etc., and create a separate project transformer. This approach can also be combined with the project collapse optimization #3937 I previously implemented, which allows for merging redundant project operations to improve performance.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing pre/post projection handling in the agg and sort transformers, then review the project-collapse optimization described in #3937. The work is complete when a separate project transformer unifies this logic through the Spark Rule approach and supports collapsing redundant project operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.