andygrove commented on PR #7249: URL: https://github.com/apache/datafusion-comet/pull/7249#issuecomment-7263798551
Thanks @sunchao. 1. `ClusteredSingleAggregateStream` doesn't need the exemption. It registers as able to spill only for `GroupClusteringMode::Partial` (`clustered_single_stream.rs:173-193`), so with `Full` it registers as unable to spill, and `limited_to_its_share` already checks it only against the pool. Only `ClusteredFinalAggregateStream` registers as spillable without a spill path (the apache/datafusion#17334 workaround). I added `a_single_aggregate_over_fully_sorted_input_is_limited_as_a_consumer_that_cannot_spill`. It runs a real `Single` `AggregateExec` over a `SortExec`, asserts it runs `Full` and that its consumer registers as unable to spill and isn't limited to its share. It also runs a `Single` sorted on one of two keys, which registers as spillable and is limited. The `limited_to_its_share` doc now says why `Single` needs no exemption. I didn't base this on `a_sort_that_fills_the_share_leaves_room_for_the_final_aggregate_above_it`, because that test still passes with the `Final` exemp tion removed. `an_ordered_final_aggregate_is_limited_as_a_consumer_that_cannot_spill` is the one that covers the exemption. (9d7cb65df5) 2. The rebuilt sort keeps the same filter. With `Recompute`, `SortExec::replace_children` calls `rebuild_filter_for_current_partitioning`, which keeps the `DynamicFilterPhysicalExpr` and builds only a new wrapper around it. `live_threshold_reaches_remapped_parquet_column_and_prunes_later_groups` already makes that check explicit: `producer` comes from the rebuilt `runtime.sort`, `consumer` is the reader's filter, and it asserts their `expression_id()` match and that their snapshot generations stay equal through the scan. It passed in `rust-test` on b5c92caa6b. 3. `HashJoinExec` isn't `Clone`, because of its `OnceAsync` build side, so the builder is the way to get an owned one out of the `Arc`. `HashJoinExecBuilder::from` copies `dynamic_filter` and `build()` keeps it. `broadcast_filter_reaches_parquet_reader_after_complete_build` asserts that the reader's filter has the same expression id as the filter `runtime.join` produces after this round trip. On #6246: thanks for checking the two against each other. Whichever lands second will rebase onto the new `init_datasource_exec` signature. -- 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]
