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

fix: Fall back to Spark for unsupported partition or sort expressions in window aggregates #1253

Merged
merged 9 commits into from
Jan 9, 2025

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Jan 9, 2025

Which issue does this PR close?

Closes #1249

Rationale for this change

Fix bug that causes Spark SQL tests to fail when we run with jvm shuffle mode.

What changes are included in this PR?

How are these changes tested?

"area",
"product")
df.createOrReplaceTempView("windowData")
checkSparkAnswer(sql("""
Copy link
Contributor

Choose a reason for hiding this comment

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

What about using checkSparkAnswerAndOperator instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

With auto and native we fall back to Spark currently

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me see if I can conditionally use checkSparkAnswerAndOperator for the jvm shuffle case

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the test. I added assertions to check for the expected shuffle exchanges and added some notes.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 34.69%. Comparing base (4cf840f) to head (5bddb87).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
.../scala/org/apache/comet/serde/QueryPlanSerde.scala 42.85% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1253      +/-   ##
============================================
- Coverage     34.88%   34.69%   -0.19%     
- Complexity      990      991       +1     
============================================
  Files           116      116              
  Lines         43755    44891    +1136     
  Branches       9569     9864     +295     
============================================
+ Hits          15263    15574     +311     
- Misses        25513    26168     +655     
- Partials       2979     3149     +170     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andygrove
Copy link
Member Author

Thanks for the review @kazuyukitanimura

@andygrove andygrove merged commit be48839 into apache:main Jan 9, 2025
74 checks passed
@andygrove andygrove deleted the partition-literl-expr branch January 9, 2025 23:55
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.

Spark SQL test "window function: partition and order expressions" fails with scala.MatchError
3 participants