andygrove commented on code in PR #7249:
URL: https://github.com/apache/datafusion-comet/pull/7249#discussion_r4697642157
##########
native/core/src/execution/delta_dv.rs:
##########
@@ -364,10 +364,14 @@ const VEC_GROWTH_CAPACITY_FACTOR: usize = 2;
/// is tiny still pays this floor.
const MIN_VEC_CAPACITY_SELECTORS: usize = 4;
-/// Conservative upper bound, in bytes, on the peak allocation live while
DataFusion 54.1's
-/// reader normalizes one file's attached [`ParquetAccessPlan`]. This, not the
plan's own
-/// retained selector bytes, is what the steady-state reservation must cover.
Three allocations
-/// can be live at once when `into_overall_row_selection` returns:
+/// Conservative upper bound, in bytes, on the peak allocation live while
DataFusion's reader
+/// normalizes one file's attached [`ParquetAccessPlan`]. This, not the plan's
own retained
+/// selector bytes, is what the steady-state reservation must cover. Three
allocations can be
+/// live at once. Term 3 was measured against DataFusion 55's file-level
combined selection;
+/// DataFusion 56 moves each row group's selection into the push decoder
instead, and the
+/// copies that replaced it (the decoder's `peek_next_row_group` clone of the
remaining row
+/// groups, and the active row group's clone) are at most `selectors`, so term
3 still covers
+/// them:
Review Comment:
Rewrote term 3 to describe the decoder's copies: the `peek_next_row_group`
clone of the queued row groups and the active row group's clone. Both are
exact-length, and together they are at most `selectors`. One sentence says the
formula keeps charging the larger file-level combined selection on purpose, and
that the measured peaks were taken on that reader. The code comment on term 3
and the comments at 712 and 912 say the same. #7766 tracks measuring the
current reader and tightening the bound. (a87c14fe58)
##########
native/core/src/execution/delta_dv.rs:
##########
@@ -2102,10 +2112,10 @@ mod tests {
assert!(matches!(err, GeneralError(_)), "unexpected error: {err:?}");
}
- /// Replays DataFusion 54.1's REAL reader-normalization path (not a
reimplementation of
- /// it): clones the attached plan exactly as `create_initial_plan` does,
calls the actual,
- /// public `ParquetAccessPlan::into_overall_row_selection` DataFusion will
call from
- /// `build_stream`, and recovers the resulting `RowSelection`'s TRUE
backing `Vec` capacity
+ /// Replays DataFusion 55's reader-normalization path: clones the attached
plan exactly as
+ /// `create_initial_plan` does, calls
`ParquetAccessPlan::into_overall_row_selection`, which
+ /// DataFusion 55 called from `build_stream` and whose combined selection
is at least as
+ /// large as the per-row-group copies DataFusion 56 makes instead, and
recovers the resulting `RowSelection`'s TRUE backing `Vec` capacity
Review Comment:
Measuring what 56 allocates needs a scan with the plan attached, since
`prepare` is `pub(crate)`, so I filed #7766 for it, including moving these
tests off `into_overall_row_selection` before DataFusion removes it. The docs,
the comments you pointed at, and the assert messages now say the tests check
the combined selection that term 3 charges for, not an allocation the reader
makes. I removed the claim about exercising the real dependency. (a87c14fe58)
##########
native/core/src/execution/memory_pools/fair_pool.rs:
##########
@@ -241,7 +241,7 @@ impl Display for CometFairMemoryPool {
/// keys.
/// `a_sort_that_fills_the_share_leaves_room_for_the_final_aggregate_above_it`
checks both.
fn limited_to_its_share(consumer: &MemoryConsumer) -> bool {
- consumer.can_spill() &&
!consumer.name().starts_with(ORDERED_FINAL_AGGREGATE)
+ consumer.can_spill() &&
!consumer.name().starts_with(CLUSTERED_FINAL_AGGREGATE)
}
/// The name prefix of the consumer that DataFusion 55.2's `ExternalSorter`
registers for what it
Review Comment:
Dropped the version from all four. I checked each against 56 first:
`ExternalSorter[` and `ExternalSorterMerge[` are still the consumer names
(`sort.rs:334-343`), the hash aggregates keep their output reserved until it is
emitted and emit slices (`hash_stream.rs:445-489`), and
`FinalHashAggregateStream` spills (`hash_stream.rs:695-731`). Three more
comments in the file said "DataFusion 56's aggregates reserve...", so they now
say "The aggregates reserve...". (b5c92caa6b)
--
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]