Skip to content

feat: Add auto mode for COMET_PARQUET_SCAN_IMPL #1747

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

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented May 17, 2025

Which issue does this PR close?

N/A

Follows on from #1746

Rationale for this change

Rather than require the user to manually configure the scan implementation, let's add an "auto" option so that we can just pick the best one based on whether the schema is supported.

What changes are included in this PR?

How are these changes tested?

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.

Project coverage is 58.59%. Comparing base (f09f8af) to head (580fdeb).
Report is 200 commits behind head on main.

Files with missing lines Patch % Lines
...n/scala/org/apache/comet/rules/CometScanRule.scala 16.66% 7 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1747      +/-   ##
============================================
+ Coverage     56.12%   58.59%   +2.46%     
- Complexity      976     1133     +157     
============================================
  Files           119      130      +11     
  Lines         11743    12672     +929     
  Branches       2251     2365     +114     
============================================
+ Hits           6591     7425     +834     
- Misses         4012     4061      +49     
- Partials       1140     1186      +46     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@parthchandra
Copy link
Contributor

Looking good so far. Will do a final review once it is ready.

Comment on lines -32 to -37
# Compatibility Guide

Comet aims to provide consistent results with the version of Apache Spark that is being used.

This guide offers information about areas of functionality where there are known differences.

Copy link
Member Author

Choose a reason for hiding this comment

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

This section appeared twice

@andygrove andygrove marked this pull request as ready for review May 20, 2025 18:48
@andygrove
Copy link
Member Author

@parthchandra @mbutrovich This is ready for review now. I don't know if we want to keep in draft until more complete or merge and iterate. I also did not make auto the default yet.

@andygrove andygrove marked this pull request as draft May 20, 2025 18:50
if (COMET_EXEC_ENABLED
.get() && schemaSupported && partitionSchemaSupported &&
!scanExec.bucketedScan && !knownIssues) {
scanImpl = SCAN_NATIVE_ICEBERG_COMPAT
Copy link
Contributor

Choose a reason for hiding this comment

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

native_iceberg_compat should be able to handle bucketed scans

}

if (scanImpl == SCAN_AUTO) {
scanImpl = SCAN_NATIVE_COMET
Copy link
Contributor

Choose a reason for hiding this comment

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

We would never choose native_datafusion?

@parthchandra
Copy link
Contributor

Not sure why this would cause the ci failures that we see here. Maybe defer this until some more of the known issues are fixed?

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.

3 participants