jeffw13 opened a new pull request, #7800: URL: https://github.com/apache/datafusion-comet/pull/7800
## Which issue does this PR close? None. ## Rationale for this change When neither list level has nulls, every output list is valid. Null elements inside a list stay in the values buffer. ## What changes are included in this PR? Return `None` for the output null buffer in that case. At 8,192 rows this made `flatten` 2.80× faster on regular lists and 2.46× faster on ragged lists. ## How are these changes tested? Added a sliced-list test with an empty row and a null element. The native expression tests and Spark’s `CometArrayExpressionSuite` passed. <details> <summary>Criterion results</summary> `cargo bench --bench flatten`, main (`07caef5f`) vs this change, AMD EPYC Genoa, x86-64-v3. Rust 1.99.1. Median of three runs per version. Ragged cases use a local extension with 0–8 lists per row, 0–8 values per list, 10% null leaves and, where indicated, 20% null lists at one level. | Case | main (µs) | PR (µs) | Speedup | |---|---:|---:|---:| | `flatten/int32/8192/all_null` | 31.65 | 31.26 | 1.01× | | `flatten/int32/8192/no_nulls` | 28.62 | 10.23 | 2.80× | | `flatten/int32/8192/sparse` | 58.70 | 58.66 | 1.00× | | `flatten/ragged/inner_nulls` | 55.35 | 48.70 | 1.14× | | `flatten/ragged/parent_nulls` | 38.63 | 37.52 | 1.03× | | `flatten/ragged/valid` | 25.14 | 10.20 | 2.46× | </details> *Drafted with OpenAI Codex.* -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
