Skip to content
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

[GLUTEN-8183][CORE] Prune unused column in project operator #8295

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

liujiayi771
Copy link
Contributor

What changes were proposed in this pull request?

Fix #8183

How was this patch tested?

Add a new UT.

@github-actions github-actions bot added the CORE works for Gluten Core label Dec 20, 2024
Copy link

#8183

@liujiayi771 liujiayi771 force-pushed the project branch 2 times, most recently from 786dcfe to 994061b Compare December 21, 2024 03:54
@liujiayi771 liujiayi771 changed the title [GLUTEN-8183] Not collapse pre-project [GLUTEN-8183] GLUTEN-8183 - Not collapse pre-project for duplicated expression evaluation Dec 21, 2024
@liujiayi771 liujiayi771 changed the title [GLUTEN-8183] GLUTEN-8183 - Not collapse pre-project for duplicated expression evaluation [GLUTEN-8183] Not collapse pre-project for duplicated expression evaluation Dec 21, 2024
@liujiayi771 liujiayi771 force-pushed the project branch 2 times, most recently from 0065d48 to 3e8cd31 Compare December 21, 2024 06:46
@liujiayi771
Copy link
Contributor Author

@taiyang-li @PHILO-HE @ulysses-you Could you help to review?

@liujiayi771
Copy link
Contributor Author

/Benchmark Velox

@liujiayi771 liujiayi771 marked this pull request as draft December 23, 2024 06:31
@liujiayi771 liujiayi771 changed the title [GLUTEN-8183] Not collapse pre-project for duplicated expression evaluation [GLUTEN-8183] Pruning unused column in project Jan 2, 2025
@liujiayi771 liujiayi771 force-pushed the project branch 5 times, most recently from c15e39b to 1505ae5 Compare January 2, 2025 13:33
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@apache apache deleted a comment from github-actions bot Jan 2, 2025
@liujiayi771 liujiayi771 marked this pull request as ready for review January 3, 2025 00:52
Copy link

github-actions bot commented Jan 3, 2025

Run Gluten Clickhouse CI on x86

@ulysses-you
Copy link
Contributor

/Benchmark Velox

@liujiayi771
Copy link
Contributor Author

@ulysses-you @PHILO-HE @taiyang-li This PR is ready for review. We didn't notice that we actually added a lot of unnecessary columns to the project.

@PHILO-HE
Copy link
Contributor

PHILO-HE commented Jan 3, 2025

@liujiayi771, our internal test shows that there is a bit perf. regression on TPCH. Is it related to this pr?

query	log/native_8295_time.csv	log/native_master_01_02_2025_time.csv	difference	percentage 
q1	25.94	25.55	-0.390	98.50% 
q2	23.69	24.20	0.518	102.19% 
q3	31.96	32.13	0.171	100.53% 
q4	26.90	26.29	-0.602	97.76% 
q5	58.37	59.65	1.283	102.20% 
q6	9.33	7.54	-1.783	80.88% 
q7	63.33	65.63	2.297	103.63% 
q8	67.45	67.33	-0.124	99.82% 
q9	103.54	96.54	-7.003	93.24% 
q10	43.52	43.03	-0.488	98.88% 
q11	17.66	16.15	-1.510	91.45% 
q12	16.57	15.72	-0.848	94.88% 
q13	28.73	26.35	-2.388	91.69% 
q14	12.22	12.34	0.126	101.03% 
q15	27.88	26.38	-1.503	94.61% 
q16	13.89	13.06	-0.825	94.06% 
q17	81.63	73.48	-8.142	90.03% 
q18	122.34	116.64	-5.694	95.35% 
q19	16.32	22.82	6.508	139.89% 
q20	24.01	23.07	-0.944	96.07% 
q21	192.21	180.51	-11.700	93.91% 
q22	11.04	10.35	-0.691	93.74% 
total	1018.52	984.79	-33.730	96.69% 

@liujiayi771
Copy link
Contributor Author

@PHILO-HE According to the TPCH plan golden file, the only change is that the number of columns output by the pre-project before the aggregation has decreased, and there are no other changes at the plan level. Is there any fluctuation?

@PHILO-HE
Copy link
Contributor

PHILO-HE commented Jan 3, 2025

@PHILO-HE According to the TPCH plan golden file, the only change is that the number of columns output by the pre-project before the aggregation has decreased, and there are no other changes at the plan level. Is there any fluctuation?

@liujiayi771, just verified the main branch, it has the same regression. So I believe the regression is not caused by your pr.

@FelixYBW FelixYBW changed the title [GLUTEN-8183] Pruning unused column in project [GLUTEN-8183] [CORE] Pruning unused column in project Jan 3, 2025
@PHILO-HE PHILO-HE changed the title [GLUTEN-8183] [CORE] Pruning unused column in project [GLUTEN-8183][CORE] Prune unused column in project operator Jan 6, 2025
Copy link
Contributor

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One comment related to test. @taiyang-li, please take a look.

import org.apache.spark.SparkConf
import org.apache.spark.sql.GlutenSQLTestsTrait

class GlutenExtensionRewriteRuleSuite extends GlutenSQLTestsTrait {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, we can move this test into gluten/gluten-ut/test, which will make it tested for all supported Spark with just one test file.

Copy link
Contributor

@taiyang-li taiyang-li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

github-actions bot commented Jan 6, 2025

Run Gluten Clickhouse CI on x86

Copy link

github-actions bot commented Jan 6, 2025

Run Gluten Clickhouse CI on x86

1 similar comment
Copy link

github-actions bot commented Jan 6, 2025

Run Gluten Clickhouse CI on x86

Copy link

github-actions bot commented Jan 6, 2025

Run Gluten Clickhouse CI on x86

Copy link

github-actions bot commented Jan 6, 2025

Run Gluten Clickhouse CI on x86

@PHILO-HE PHILO-HE merged commit 3d3adb3 into apache:main Jan 7, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLICKHOUSE CORE works for Gluten Core VELOX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CH] Duplicated expression evaluation in project before aggregate operator due to PullOutPreProject Rule
4 participants