You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/04/01 10:53:21 UTC

[I] Native scans cannot propagate JVM-side Spark accumulators [datafusion-comet]

andygrove opened a new issue, #3867:
URL: https://github.com/apache/datafusion-comet/issues/3867

   ## Description
   
   When using native Parquet scans (`COMET_PARQUET_SCAN_IMPL=native_datafusion`), Spark accumulators registered on the JVM side are not incremented because the native reader operates entirely in Rust via DataFusion and does not call back into JVM accumulator APIs.
   
   This causes several Spark SQL tests to fail because they rely on accumulators (e.g. `NumRowGroupsAcc`) to verify filter pushdown behavior. The filter pushdown itself works correctly in the native scan, but the test mechanism (the accumulator) does not work across the JNI boundary.
   
   ## Affected Tests
   
   The following Spark SQL tests are currently ignored with `IgnoreCometNativeScan` due to this limitation:
   
   - `filter pushdown - StringPredicate` (ParquetFilterSuite) - uses `NumRowGroupsAcc` to verify string predicate pushdown
   - `Filters should be pushed down for vectorized Parquet reader at row group level` (ParquetFilterSuite) - uses accumulator to verify row group level filtering
   - `SPARK-34562: Bloom filter push down` (ParquetFilterSuite) - uses accumulator to verify bloom filter pushdown
   
   These tests are skipped across all Spark versions (3.4, 3.5, 4.0).
   
   ## Possible Solutions
   
   1. Implement accumulator propagation from native scans back to JVM
   2. Add equivalent native-side metrics that can be queried from JVM after execution
   3. Write alternative Comet-specific tests that verify the same pushdown behavior without relying on accumulators


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Native scans cannot propagate JVM-side Spark accumulators [datafusion-comet]

Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
parthchandra commented on issue #3867:
URL: https://github.com/apache/datafusion-comet/issues/3867#issuecomment-4200845969

   The original `native_comet` implementation used to propagate `NumRowGroupsAcc` but it would break every time we updated Spark because accessing it used a non-public API and the Spark team kept changing the signature.
   Eventually, we took it out and I don't think we plan to ever fix this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Native scans cannot propagate JVM-side Spark accumulators [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on issue #3867:
URL: https://github.com/apache/datafusion-comet/issues/3867#issuecomment-5870664659

   I think we can close this as not planned. As noted above, the accumulator hook depended on a non-public Spark API that changed with every release, and the three tests now carry their own IgnoreComet reasons instead of a link here. Row-group pruning in the native scan is observable through its row_groups_pruned_statistics and row_groups_pruned_bloom_filter metrics, which CometNativeReaderSuite already asserts on for statistics pruning.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org