Skip to content

Conversation

@wForget
Copy link
Member

@wForget wForget commented Mar 24, 2025

Which issue does this PR close?

Closes #1562.

Rationale for this change

Improve performance of native_iceberg_compat scan

What changes are included in this PR?

How are these changes tested?

added unit test

@mbutrovich
Copy link
Contributor

mbutrovich commented Mar 24, 2025

Note that we actually expect performance to be worse with pushdown with the DataSourceExec-driven native decoders at the moment. @andygrove tested native_datafusion with the feature turned off and it was significantly faster. See @XiangpengHao's excellent blog post:

https://blog.xiangpeng.systems/posts/parquet-pushdown/

Once apache/arrow-rs#6921 merges and we pick up that Arrow-rs release we should see the performance benefit.

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2025

Codecov Report

Attention: Patch coverage is 64.67662% with 71 lines in your changes missing coverage. Please review.

Project coverage is 58.64%. Comparing base (f09f8af) to head (8896f67).
Report is 106 commits behind head on main.

Files with missing lines Patch % Lines
...cala/org/apache/comet/parquet/ParquetFilters.scala 63.04% 10 Missing and 24 partials ⚠️
...a/org/apache/comet/parquet/SourceFilterSerde.scala 63.63% 17 Missing and 11 partials ⚠️
...va/org/apache/comet/parquet/NativeBatchReader.java 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1566      +/-   ##
============================================
+ Coverage     56.12%   58.64%   +2.51%     
- Complexity      976     1026      +50     
============================================
  Files           119      123       +4     
  Lines         11743    12418     +675     
  Branches       2251     2337      +86     
============================================
+ Hits           6591     7282     +691     
+ Misses         4012     3965      -47     
- Partials       1140     1171      +31     

☔ 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.

@wForget wForget force-pushed the pushdown_filter_native_iceberg_compact branch from 4caad5d to 0a70e78 Compare March 25, 2025 08:41
@wForget wForget marked this pull request as ready for review March 25, 2025 10:05
@mbutrovich
Copy link
Contributor

Thank you for taking a look at this! I'll take a pass through this.

@kazuyukitanimura
Copy link
Contributor

Looks good, do we still need to wait for arrow-rs based on #1566 (comment) ?

@mbutrovich
Copy link
Contributor

Looks good, do we still need to wait for arrow-rs based on #1566 (comment) ?

We can merge it. I'd rather be testing the pushdown logic as the default, even if it's a little bit slower right now.

Copy link
Contributor

@parthchandra parthchandra left a comment

Choose a reason for hiding this comment

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

Great PR @wForget !

}
}

test("test V1 parquet scan filter pushdown of primitive types uses 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.

Can we enable this test for both native_datafusion and native_iceberg_compat?

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 enabled the test for native_datafusion, but the current native_datafusion mode always push down fitlers, I added a comment:

if (scanMode == CometConf.SCAN_NATIVE_DATAFUSION && !pushDown) {
// FIXME: native_datafusion always pushdown data filters
break()
}

@wForget wForget force-pushed the pushdown_filter_native_iceberg_compact branch from 24ac82b to 8896f67 Compare March 31, 2025 04:12
@kazuyukitanimura
Copy link
Contributor

Looks good, do we still need to wait for arrow-rs based on #1566 (comment) ?

We can merge it. I'd rather be testing the pushdown logic as the default, even if it's a little bit slower right now.

cc @andygrove if you are doing some benchmarks

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM. I agree with @mbutrovich that it is better to get test coverage for this feature even though we expect some slowdown until we pick up the changes from Arrow.

Also, we can always add a config to disable the pushdown if we need to.

Thank you @wForget.

@andygrove andygrove merged commit c4c998c into apache:main Mar 31, 2025
68 checks passed
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.

Push down data filter for native_iceberg_compat

6 participants