-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CORE] Expand project when subplan is aggregation #3440
Comments
@zhztheplayer @rui-mo @PHILO-HE |
FYI, similar to #3391. |
Do you mean disable collapsing agg + project for any plan? Or disable it only when post project is not transformable. Thanks! |
Disable collapsing agg + project for any plan. |
I am not sure how much perf. can be improved by the collapse optimizer for vanilla spark. If we try to disable collapsing agg + project for any plan, it may be better to also consider the perf. impact on agg fallback + project fallback case. Could you have a test and perf. comparison for vanilla spark by turning on/off the below config? Thanks! cc @zhztheplayer --conf spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.CollapseProject |
Backend
CH (ClickHouse)
Bug description
In spark rule
org.apache.spark.sql.catalyst.optimizer.CollapseProject
, project and aggregate will be collapsed.In this example,
ObjectHashAggregate
will be fallback ,becausesplit
expresstion currently is not support.It's a bad fallback.Because partial aggregate plan not fallback, In ch backend partial agg has own struct data. The struct of data not support columnToRow.
In gluten code, final aggregate plan tranform to substrait plan will apply function
applyPostProjection
. And generate tow relnodeproject
andaggRel
to backend.Can we expand
HashAggregate
toProject
andHashAggregate
beforeAddTransformHintRule
. It will generate a plan likeIf
Project
has not support expression, we can fallbackProject
only.Spark version
None
Spark configurations
No response
System information
No response
Relevant logs
No response
The text was updated successfully, but these errors were encountered: