-
Notifications
You must be signed in to change notification settings - Fork 463
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-4475][VL] Allow offloading Spark hour function #4495
Conversation
Hi @PHILO-HE @ulysses-you, fix gluten validate spark |
can we add a test ? |
@@ -907,4 +907,9 @@ class TestOperator extends VeloxWholeStageTransformerSuite with AdaptiveSparkPla | |||
|""".stripMargin | |||
)(df => checkFallbackOperators(df, 1)) | |||
} | |||
|
|||
test("Support HOUR function") { | |||
runQueryAndCompare("SELECT l_orderkey, HOUR('2024-01-23 19:27:01') FROM lineitem LIMIT 1")( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pr.
It would be better to create a table for this test if there is no suitable tpch data for this function, like the below. I'm afraid Spark will optimize literal input with its constantFolding, which meaninglessly makes an alias projection offload to gluten.
https://github.com/oap-project/gluten/blob/main/backends-velox/src/test/scala/io/glutenproject/execution/TestOperator.scala#L441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your info, created a template table to test HOUR function.
Run Gluten Clickhouse CI |
4 similar comments
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
Run Gluten Clickhouse CI |
Hi @zwangsheng, it looks the CI failure is a known issue: "-08:00 not found in timezone database". I once submitted an issue in velox community: facebookincubator/velox#7804. You can remove such test case where "-8:00" is used and leave some comments to clarify. |
Run Gluten Clickhouse CI |
1 similar comment
Run Gluten Clickhouse CI |
@zwangsheng please resolve conflicts first |
bee68c5
to
30a2811
Compare
Run Gluten Clickhouse CI |
1 similar comment
Run Gluten Clickhouse CI |
6fedf3d
to
5f28ee6
Compare
Run Gluten Clickhouse CI |
Hi @PHILO-HE @ulysses-you, failed CI test not related. PTAL again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for your work!
It seems the failed tests in ck backend is related.
|
@zwangsheng, we should exclude the new test "Gluten - Hour" in ClickHouseTestSettings. Thanks! |
Run Gluten Clickhouse CI |
1 similar comment
Run Gluten Clickhouse CI |
I note a new conflict. Could you rebase again? Thanks so much! |
1684e7d
to
f39a652
Compare
Run Gluten Clickhouse CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks!
SubstraitToVeloxPlanValidator
Thanks all for your review @ulysses-you @PHILO-HE 😄 |
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
|
What changes were proposed in this pull request?
After Velox support facebookincubator/velox#8237 HOUR function, we should not fail HOUR function with native validation.
Close #4475
How was this patch tested?
Local test
Run Spark Local Shell with Gluten(add this PR)