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-3801][VL] Fix isAdaptiveContext null value for ColumnarOverrideRules #3795

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

zhli1142015
Copy link
Contributor

@zhli1142015 zhli1142015 commented Nov 21, 2023

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)

Fixes: #3801

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/oap-project/gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

Copy link

Run Gluten Clickhouse CI

@zhli1142015 zhli1142015 changed the title [WIP][VL] Fix isAdaptiveContext null value for ColumnarOverrideRules [GLUTEN-3801][VL] Fix isAdaptiveContext null value for ColumnarOverrideRules Nov 21, 2023
@zhli1142015 zhli1142015 marked this pull request as ready for review November 21, 2023 11:06
Copy link

#3801

@zhli1142015
Copy link
Contributor Author

@rui-mo , @ulysses-you , @zhztheplayer , could you please help to review? For details please see #3801

@@ -749,7 +751,8 @@ case class ColumnarOverrideRules(session: SparkSession)
private val aqeStackTraceIndex = 14

// Holds the original plan for possible entire fallback.
private val localOriginalPlan = new ThreadLocal[SparkPlan]
private val localOriginalPlans = new ThreadLocal[ListBuffer[SparkPlan]]
private val localIsAdaptiveContextFlags = new ThreadLocal[ListBuffer[Boolean]]
Copy link
Contributor

Choose a reason for hiding this comment

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

It's interesting.. Do you mean the columnarRule can be reentrant, Delta would apply columnarRule inside columnarRule ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, from log, the delta log is loaded when applying columnarRules.
Details are listed in #3801

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with this change, cc @PHILO-HE @zzcclp to make sure it would not break anything.

Copy link

Run Gluten Clickhouse CI

@zzcclp
Copy link
Contributor

zzcclp commented Nov 22, 2023

it's better to add a ut for this issue ?

Copy link

Run Gluten Clickhouse CI

@zhli1142015
Copy link
Contributor Author

it's better to add a ut for this issue ?

Yes, added the failed case to delta ut.

@zhli1142015
Copy link
Contributor Author

@ulysses-you , @zzcclp , @PHILO-HE , do you have any more commetns?
Thanks.

@ulysses-you ulysses-you merged commit c7bce95 into apache:main Nov 22, 2023
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.

Seems we never encountered nested rule applying before. Looks good! Thanks!

@GlutenPerfBot
Copy link
Contributor

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query log/native_3795_time.csv log/native_master_11_21_2023_b40a5f094_time.csv difference percentage
q1 33.07 33.71 0.639 101.93%
q2 25.12 24.92 -0.195 99.22%
q3 38.03 37.63 -0.398 98.95%
q4 36.90 35.99 -0.910 97.53%
q5 70.36 70.48 0.115 100.16%
q6 7.20 7.11 -0.097 98.66%
q7 84.44 84.08 -0.359 99.57%
q8 85.52 87.02 1.501 101.76%
q9 122.77 124.24 1.463 101.19%
q10 43.78 46.06 2.278 105.20%
q11 19.85 19.24 -0.607 96.94%
q12 25.62 25.38 -0.238 99.07%
q13 45.93 45.84 -0.087 99.81%
q14 15.27 18.33 3.060 120.04%
q15 27.64 28.80 1.160 104.20%
q16 15.44 15.37 -0.072 99.53%
q17 101.05 100.95 -0.104 99.90%
q18 148.34 146.37 -1.978 98.67%
q19 13.82 12.89 -0.934 93.24%
q20 28.32 28.27 -0.054 99.81%
q21 219.24 222.09 2.851 101.30%
q22 13.25 12.99 -0.256 98.07%
total 1220.98 1227.75 6.778 100.56%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[VL] isAdaptiveContext null value for ColumnarOverrideRules
5 participants