Skip to content

deps: upgrade to DataFusion 56.0.0 - #7249

Open
andygrove wants to merge 29 commits into
mainfrom
datafusion-56
Open

andygrove wants to merge 29 commits into
mainfrom
datafusion-56

Conversation

@andygrove

@andygrove andygrove commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Part of #6410, which tracks the regressions this PR finds. Closes #7541 and #7242.

The nested BINARY UTF-8 regression is tracked in #7469. Its upstream fix, apache/datafusion#27067, is on DataFusion main but not in 56.0.0. This PR is a draft and is not meant to merge until that fix is released in a 56.0.x patch release and Comet uses it.

This replaces #6404, moving the branch from a fork to datafusion-56 in this repository.

Rationale for this change

DataFusion 56.0.0 moves to arrow/parquet 60.1.0 and object_store 0.14.2 (apache/datafusion#25335, apache/datafusion#26867), and it has a number of API changes (see its 56.0.0 upgrade guide). Building Comet against it now surfaces the breaks early and lets CI run the Comet suites against it.

What changes are included in this PR?

Dependencies

  • datafusion, datafusion-datasource, datafusion-functions, datafusion-physical-expr-adapter and datafusion-spark in the workspace now use the 56.0.0 release from crates.io. So do the datafusion-functions-nested dev-dependency in core and datafusion in both contrib crates.
  • arrow, arrow-data, arrow-select and parquet go from 59.2.0 to 60.1.0.
  • object_store goes from 0.13.2 to 0.14.2. object_store_opendal goes from 0.58.0 to 0.59.0, the first release on object_store 0.14. That release keeps opendal on 0.58, which is what the iceberg-rust revision below uses.
  • parking_lot goes from 0.12 to 0.13, the version DataFusion's LazyBatchGenerator API now uses.
  • iceberg and iceberg-storage-opendal move to 219078c on iceberg-rust main. It includes Bump to Arrow 60 iceberg-rust#3257 ("Bump to Arrow 60") and fix(writer): skip NaN min/max when aggregating Parquet column bounds iceberg-rust#3539, which skips NaN min and max statistics in manifest bounds.
    • Comet hands arrow types to iceberg-rust directly, so the two must agree on arrow.
    • iceberg-rust's ArrowReaderBuilder now takes its settings as ArrowReaderOptions, and FileScanTaskDeleteFile::file_size_in_bytes is now an Option. iceberg_scan.rs uses the new API.
  • Lockfiles: native/Cargo.lock, native/native-executors/Cargo.lock and contrib/delta/native/Cargo.lock are regenerated.
  • native/native-executors moves Ballista to 5a387e1 on its main branch, which uses the DataFusion 56.0.0 release, and DataFusion and datafusion-proto to the 56.0.0 release. The workspace builds with one copy of DataFusion again, so its linux-test-native-executors CI job is back on. Ballista has not released 56.0.0 yet.

Source changes (all forced by the upgrade)

  • Arrow 60.1 deprecates ArrowArrayStreamReader in favor of RecordBatchStreamReader, and FixedSizeListArray::value_offset in favor of value_offset_at. Comet uses the new names.
  • Arrow 60 made the FFI_ArrowArrayStream callbacks private, so the decimal-realignment test in scan.rs can no longer build a hand-rolled C stream. It now exports a struct array and imports it with from_ffi_and_data_type, the call RecordBatchStreamReader::next makes. AlignedArrowStreamReader was already gone on main.
  • Parquet 60 moved the page index behind ParquetMetaData::page_index(), a PageIndexProvider with per-row-group access.
    • with_spark_arrow_schema and the rebase footer rewrite carry it over with set_page_index.
    • page_selection_bound_selectors in delta_dv.rs walks the row groups through page_index_for_row_group.
    • The tests check page_index() instead of column_index()/offset_index().
  • AggregateExec::input_order_mode() is now group_clustering_mode(), returning a GroupClusteringMode. Two planner tests and a min_max_struct test use it.
  • refactor: use group clustering terminology in aggregate execution datafusion#24697 renamed OrderedFinalAggregateStream and its memory consumer to ClusteredFinalAggregateStream. The fair pool's exemption and SpillReplayPool's final-aggregate check match that consumer by name, so they now match the new name. Without this they silently stopped applying.
  • SpillReplayPool also covers ClusteredSingleAggregateStream, which DataFusion 56 runs for a Single aggregate over input sorted on some of its keys and which replays its spill files the same way.
  • DataFusion's coerce_int96 and coerce_int96_tz are now typed (DFTimeUnit, ConfigTimeZone) instead of strings.
  • object_store 0.14 added GetResult::extensions, which ScanIoObjectStore::get_opts now forwards.
  • OffsetBuffer::first()/last() now return values instead of Options.
  • Field and schema metadata are now arrow's Metadata type. The datetime rebase resolution reads it directly, and the shuffle schema cache's size estimate uses len() instead of capacity().
  • fb_to_schema is deprecated. The shuffle decoder uses try_fb_to_schema, so an invalid schema message now returns a decode error where it used to panic.
  • FFI_ArrowSchema::with_metadata is now unsafe. The call in move_to_spark is sound because the schema was just built by TryFrom.
  • HashJoinExec::with_dynamic_filter_expr and SortExec::with_dynamic_filter_expr are deprecated with no replacement, and Comet no longer calls them.
    • The runtime TopK takes the filter a SortExec with a fetch creates for itself (dynamic_expressions_produced()) and hands it to the Parquet reader below the sort.
    • DynamicFilterJoinExec reports to HashJoinExec::handle_child_pushdown_result what DataFusion's FilterPushdown rule would, namely that the probe-side self filter was pushed down. The join then installs the filter itself, after finding Comet's consumer in its probe subtree.
  • Two other DataFusion APIs are deprecated, and each call stays under #[allow(deprecated)]:
    • ExecutionPlan::with_preserve_order, which DataFusion no longer calls. MetricOwningExec keeps forwarding it.
    • ParquetAccessPlan::into_overall_row_selection, in three delta_dv.rs tests. DataFusion 56's reader no longer builds that file-level selection. It moves each row group's selection into the parquet push decoder, and the decoder's copies are at most the retained selectors. reader_peak_bytes keeps charging term 3 as the larger combined selection, so it is still an upper bound. Its doc comment now describes the decoder's copies, and the three tests say they check the formula, not the reader. Measure the Delta deletion vector reader peak on DataFusion 56 and tighten reader_peak_bytes #7766 tracks measuring the reader and moving the tests off the deprecated call.
  • normalize_spark_empty_key_metadata_rejects_other_malformed_encodings: Arrow 60 accepts empty entries in unsorted Variant dictionaries (Add proptest fuzzing to parquet-variant and implement fixes for findings arrow-rs#10352).
    • Two of the five "malformed" dictionaries in the test were rejected only because of their empty entry: the one with a repeated entry and the one with trailing bytes.
    • Both now pass through unchanged. That matches Spark, which checks only the offsets of the keys it looks up, so the test now asserts it.
  • make_map_c in comet-test-udfs: arrow 60's MapBuilder names the map children key/value by default, so the test UDF now names them keys/values explicitly to keep exercising non-canonical names.
  • merge_rows.rs goes back to and_not for the not-matched masks. arrow 60.1 fixes it for inputs with a non-zero offset (and_not produces incorrect values for sliced BooleanArray arrow-rs#10698).
  • The runtime TopK no longer clears Parquet column statistics that omit null_count before attaching its filter to the reader. DataFusion 56 reads an omitted count as unknown (fix: preserve missing Parquet null counts datafusion#25242). topk/reader.rs is gone, and the TopK attaches through try_attach_parquet_reader_filter like the min/max and join filters. It also attaches when the scan has a static predicate, which it skipped before because clearing statistics could expose a file that predicate excluded. static_range_with_unknown_null_count_keeps_hiding_an_excluded_file checks that it attaches and that the static predicate still hides the file.
  • datafusion-spark's SparkXxhash64 now ignores the hidden children of a NULL struct (fix: xxhash64 of a NULL struct ignores the struct fields datafusion#25774) and keeps the running hash for nested dictionaries (fix: keep the running hash for nested dictionaries in Spark xxhash64 datafusion#25813). Three tests in xxhash64_diff.rs that pinned those differences now assert equality. Comet still keeps its own kernel for those types. Route struct and nested dictionary xxhash64 arguments to datafusion-spark's SparkXxhash64 #7764 tracks widening the routing.

Known issue: invalid UTF-8 in nested BINARY values read as strings

apache/datafusion#25193 made DataFusion's Parquet file-schema coercion recurse into nested types, so a nested BINARY field that the read schema declares as a string is decoded straight into Utf8. The parquet reader validates UTF-8 only for columns with the UTF8 annotation, so an invalid value produces an unvalidated StringArray: a panic in debug builds, and unsound data in release builds. On main, #7106 decodes these values to U+FFFD. This PR ignores #7106's Rust test (nested_arrow_binary_types_read_as_string_decode_invalid_utf8) and JVM test (ParquetReadSuite "native scan decodes invalid UTF-8 in nested BINARY read as string"). The issue is tracked in #7469 and was reported upstream as apache/datafusion#27065. apache/datafusion#27067 fixes it on DataFusion main. It cherry-picks cleanly onto branch-56, and this PR needs it in a 56.0.x release before it merges. Then the two tests are turned back on.

DataFusion behavior changes checked against Comet

  • The floor/ceil return types and the result of map_extract for absent keys changed. Comet registers its own floor, ceil and map_extract, so neither change reaches Comet.
  • Missing Parquet null counts are now treated as unknown instead of zero. This is a correctness fix. It can disable some pruning on files written by parquet-rs before 53.1.

Not included (possible follow-ups)

How are these changes tested?

  • CometAggregateSuite "any_value of an array of strings reserves only what it keeps (issue ANY_VALUE memory regression in Comet 1.2.0 #7541)" runs the reproducer from ANY_VALUE memory regression in Comet 1.2.0 #7541 with a 16 MiB pool. It fails on main with the error from the issue ("Failed to acquire 52135888 bytes ... the pool limit is 16777216 bytes" in OrderedFinalAggregateStream) and passes on this branch.
  • spill_replay.rs has a new test for a fair share lowered between the merge's headroom check and the replay. It fails without the wrapper.
  • CometIcebergWriteActionSuite "native acceleration: NaN float/double manifest metrics match the JVM writer" runs again, now that the iceberg-rust revision includes fix(writer): skip NaN min/max when aggregating Parquet column bounds iceberg-rust#3539.
  • Locally on macOS aarch64: cargo fmt and cargo clippy --all-targets --workspace -- -D warnings are clean in native/ and native/native-executors. The native tests for the memory pools, Iceberg scan, delta_dv, aggregate planner, dynamic filters, merge_rows and xxhash64 pass.
  • CI runs the Comet suites on the default profile. Spark's own SQL tests, the Iceberg Spark tests and the other Spark profiles need the run-all-spark-profiles, run-spark-4.1-tests and run-iceberg-tests labels.

…store 0.14

Point the DataFusion dependencies at a git revision of apache/datafusion main
(350ca76505c9513d16e7dd9910bcd9bde2c911ed), which is on arrow/parquet 60.0.0 and
object_store 0.14.2. Bump arrow, parquet, object_store and object_store_opendal
(0.59.0, the first release on object_store 0.14) to match.

iceberg-rust main is still on arrow 59, and the head of apache/iceberg-rust#3257
(Arrow 60) is 42 commits behind the main revision Comet builds against. Pin
iceberg and iceberg-storage-opendal to a branch on the andygrove/iceberg-rust
fork that merges apache/iceberg-rust main (1f3bc34) into that PR.

Source changes for the new APIs:
- Arrow 60 makes the FFI_ArrowArrayStream callbacks private, so the
  decimal-realignment test builds the import with from_ffi_and_data_type.
- Parquet 60 moves the page index behind ParquetMetaData::page_index(), a
  PageIndexProvider with per-row-group access.
- DataFusion's coerce_int96 and coerce_int96_tz are typed (DFTimeUnit,
  ConfigTimeZone) instead of strings.
- OffsetBuffer::first/last return values and schema metadata is arrow's
  Metadata type.
- HashJoinExec::with_dynamic_filter_expr, SortExec::with_dynamic_filter_expr,
  ExecutionPlan::with_preserve_order and ParquetAccessPlan::into_overall_row_selection
  are deprecated; allow them where Comet still needs them.
- Arrow 60's MapBuilder names map children key/value by default, so make_map_c
  names them keys/values explicitly to keep exercising non-canonical names.
- datafusion-spark's SparkXxhash64 now ignores the hidden children of a NULL
  struct and keeps the running hash for nested dictionaries (apache/datafusion
  #25774, #25813), so the tests that pinned those differences assert equality.
…ore its test

Parquet 60 writes NaN min/max statistics for a float or double column chunk
holding only NaN, and iceberg-rust copies them into the manifest bounds, where
iceberg-java records none. Ignore the parity test that catches it, list the
issue under the Iceberg known issues and add it to the 1.3.0 upgrade guide.
It is tracked in #7242.
@andygrove andygrove added dependencies Pull requests that update a dependency file area:shuffle Shuffle (JVM and native) area:scan Parquet scan / data reading area:expressions Expression evaluation area:ffi Arrow FFI / JNI boundary area:Iceberg area:joins Join operators and dynamic filter pushdown area:Delta Delta Lake contrib (native scan, deletion vectors) labels Oct 26, 2026
@andygrove andygrove changed the title deps: use DataFusion main (350ca76) with Arrow/Parquet 60 and object_store 0.14 deps: upgrade to DataFusion 56.0.0 Oct 26, 2026
@andygrove andygrove added run-all-spark-profiles Run the Comet test suites against every Spark profile on this pull request, ahead of the merge queue run-iceberg-tests labels Oct 26, 2026
Point the DataFusion dependencies at the head of apache/datafusion branch-56
(1635ed94742c1c060852bc34dc6ebb2302241c7b), cut for the 56.0.0 release. It is
116 commits past the previous main revision and moves arrow/parquet to 60.1.0.

- Bump arrow, arrow-data, arrow-select and parquet to 60.1.0.
- Bump parking_lot to 0.13, which DataFusion's LazyBatchGenerator API now uses.
- Rename ArrowArrayStreamReader to RecordBatchStreamReader (deprecated alias).
- Use FixedSizeListArray::value_offset_at instead of the deprecated value_offset.
- Arrow 60.1.0 encodes the IPC frame in the RSS bounded-buffer test 2048 bytes
  smaller, so the test measures the frame size instead of hard-coding it.
DataFusion 56 coerces nested BINARY file fields to Utf8 before the parquet
reader, which skips UTF-8 validation for unannotated BINARY columns, so the
native scan panics in debug builds instead of decoding to U+FFFD. Ignore the
Rust and JVM tests from #7106 until apache/datafusion#27065 is fixed (#7469).
…d setters

DataFusion 56 deprecates HashJoinExec::with_dynamic_filter_expr and
SortExec::with_dynamic_filter_expr with no replacement. Comet does not need
them:

- A SortExec with a fetch creates its own TopK filter, so the runtime TopK
  takes that filter from dynamic_expressions_produced() and hands it to the
  Parquet reader below the sort, instead of installing one from outside.
- For joins, Comet reports to HashJoinExec::handle_child_pushdown_result
  what DataFusion's FilterPushdown rule would: the probe-side self filter
  was pushed down. The join then installs the filter itself after finding
  Comet's consumer in its probe subtree.
DataFusion 56 renames OrderedFinalAggregateStream to
ClusteredFinalAggregateStream (apache/datafusion#24697), and the memory
consumer with it. The fair pool's exemption for that consumer and the spill
replay pool's final-aggregate check match it by name, so on DataFusion 56
neither matched anymore. Match the new name, and update the tests, docs and
comments that use the old one.
@github-actions github-actions Bot added the area:memory Memory pools, reservations, OOM handling label Nov 3, 2026
# Conflicts:
#	native/native-executors/Cargo.lock
DataFusion 56 includes apache/datafusion#25383, which leaves room for a
final aggregate to read its spill files back, so SpillReplayPool is no
longer needed. It is also now harmful: #25383 holds replay headroom on a
sibling reservation while the spill merge picks its files, so the pool
took every refused read-buffer request for a replay and granted it. The
merge then opened every spill file and starved the next aggregate, which
failed the #6880 PartialMerge test with a 2 MiB pool.

The #6254 and #6857 read-back tests, which the pool was added for, pass
without it. The sort-merge join #6880 test now uses an 8 MiB pool,
because with DataFusion 56 its PartialMerge fits in 12 MiB or more
without spilling.

Closes #6583.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andygrove
andygrove marked this pull request as ready for review November 24, 2026 14:48

@viirya viirya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for carrying this upgrade. Most of the API migration is mechanical and reads cleanly. Removing SpillReplayPool is a nice reduction if it holds up, and I left questions on that inline.

A couple of things that aren't tied to a line:

  • Closes #7541 relies on apache/datafusion#26743, but nothing here exercises that fix. Could you add the issue's ANY_VALUE(array<string>) reproducer as a test?
  • The description has drifted from the diff in a few places: the iceberg revisions, the NaN known issue (now fixed, which closes #7242), native-executors "stays on its previous pin", and the spill replay pool. Could you refresh it?

Comment thread .github/workflows/pr_build_linux.yml Outdated
name: ubuntu-latest/native-executors
if: ${{ !inputs.cache-refresh-only && inputs.profiles != 'nightly' }}
# if: ${{ !inputs.cache-refresh-only && inputs.profiles != 'nightly' }}
if: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Preflight rejects this because the job loses its cache-refresh-only and nightly guards. Since then every other job has been skipped, so nothing has run against the crates.io 56.0.0 build. Something like if: ${{ false && !inputs.cache-refresh-only && inputs.profiles != 'nightly' }} should keep Preflight happy. The comment above, and the one in native-executors/Cargo.toml, still say Comet is on the 56.0.0 tag.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ballista main is on the DataFusion 56.0.0 release now, so I moved native/native-executors to Ballista 5a387e1, and DataFusion and datafusion-proto to 56.0.0 from crates.io. The workspace resolves one copy of DataFusion again and builds and passes clippy locally, so the job is back on with main's original if:. The comments in the workflow and in native-executors/Cargo.toml are updated too. (ad6ed8c)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The job builds now, but runs_a_query_across_a_range_exchange fails with CometFragmentExec input 0 has 4 partitions, expected 1 from EnsureRequirements. Is that a change on Ballista main, or does Comet's fragment need to report its partitioning differently on 56?

off_heap_size,
running_tasks.clone(),
)),
tracked(CometFairMemoryPool::with_spark(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As I read #25383, the merge's headroom is only a probe. It grows to 2× and then shrinks back before the replay starts. After that, the replay's ClusteredFinalAggregateStream (Full, no spill path) calls try_grow under the FinalHashAggregateStream consumer, which limited_to_its_share still limits. What keeps the replay from failing in these two cases?

  1. Spark grants that memory elsewhere, or another spillable consumer registers, between the probe and the replay.
  2. A group grows past the merge buffers, as #25383 itself notes for array_agg.

1.2 overcommitted in both cases. Do the #6254 or #6857 tests cover either one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right. In 56.0.0, get_sorted_spill_files_to_merge asks for twice the buffers and then shrinks back to the accepted buffers before the replay (multi_level_merge.rs:612-684). The replay is a Full ClusteredFinalAggregateStream with no spill context, under the outer aggregate's consumer (spill.rs:303-335). Its only fallback is to emit completed groups, and it returns the error when the table holds one group. So both of your cases can still fail the task, and none of the #6254/#6857 tests reach either one. They all run one task with small groups.

I put SpillReplayPool back and updated it for the 56 names: FinalHashAggregateStream, ClusteredFinalAggregateStream, SingleHashAggregateStream, and the new ClusteredSingleAggregateStream, which replays the same way. Its check that the consumer holds more than the growing reservation still identifies the replay in 56, because the merge's headroom check grows and shrinks a single reservation. I added a pool test for case 1, ..._may_pass_a_share_lowered_after_the_merge: the merge probes and releases, a sort becomes active, and the replay's request goes past the lowered share. It fails without the wrapper. The module docs and the memory management guide now say why apache/datafusion#25383 isn't enough. (188f7cd)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for restoring it. The two #6880 PartialMerge tests now fail in every [exec] job with an OOM in ClusteredPartialAggregateStream[0]. That looks like the merge starvation from b46499740 again.

As far as I can tell, switch_to_clustered_final_stream builds the replay ClusteredFinalAggregateStream before the merge stream is polled. Its constructor reserves the initial table (clustered_final_stream.rs:188). So when get_sorted_spill_files_to_merge runs, the consumer already holds memory in a sibling reservation. That makes consumer_used > reservation.size() true for the merge's own refusals. Is there another way to tell the merge's reservation from the replay's? The new pool test steps the reservations in the opposite order, so it doesn't catch this.

/// Spark's string type as those types, not as `Binary`. A malformed value must still decode
/// to U+FFFD.
#[tokio::test]
#[ignore = "DataFusion 56 coerces nested BINARY to unvalidated Utf8: https://github.com/apache/datafusion-comet/issues/7469"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apache/datafusion#27065 is closed by #27067, but that landed on main only, so 56.0.0 doesn't have it. Is the plan to get it backported for a 56.0.1, or to fall back or validate on the Comet side for nested binary read as string?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The plan is a backport. apache/datafusion#27067 cherry-picks cleanly onto branch-56, and its tests pass there. I opened apache/datafusion#27754 to backport it, so that it can go into a 56.0.1. This PR stays a draft until Comet can use that release. Then the two ignored tests go back on.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good. The PR still shows as ready for review, though. Could you convert it to a draft while apache/datafusion#27754 is pending?

Comment thread native/Cargo.toml Outdated
iceberg = { git = "https://github.com/apache/iceberg-rust", rev = "de0a6ac8471da43f63382d66fac27d7e56fd273e" }
iceberg-storage-opendal = { git = "https://github.com/apache/iceberg-rust", rev = "de0a6ac8471da43f63382d66fac27d7e56fd273e", features = ["opendal-memory", "opendal-fs", "opendal-s3", "opendal-gcs", "opendal-oss", "opendal-azdls", "opendal-hdfs-native"] }
# version requirement once a release ships on arrow 60. Bump policy: #5645.
# The revision is on the andygrove/iceberg-rust fork: apache/iceberg-rust#3257 (Arrow 60,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apache/iceberg-rust#3257 merged on Nov 10. Can this move back to an upstream main revision that also includes #3539, and drop the fork?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done. The fork is gone, and the pin is now 219078c on iceberg-rust main, which includes apache/iceberg-rust#3257 and apache/iceberg-rust#3539. I stopped one commit short of the current head: 986153c moves iceberg-rust to opendal 0.59, and Comet's own opendal and object_store_opendal would have to move with it, so I'd rather do that in its own PR. Two iceberg-rust API changes came along: reader settings now go through ArrowReaderOptions, and FileScanTaskDeleteFile::file_size_in_bytes is an Option. (5c04cc9)

// Final also reads states from the columns after the keys, so the input must be the keys
// followed by native states (Spark's binary collect buffers keep Single, and arrive
// unordered anyway).
// Drop this on DataFusion 56, where the stream is ClusteredFinalAggregateStream

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This says to drop the PartialMerge→Final switch on DataFusion 56. Is it still needed? If so, could the comment say why?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not for the reason it gives. On 56, Single over partially sorted input runs ClusteredSingleAggregateStream (mod.rs:1422-1428, with enable_migration_aggregate defaulting to true), which spills, and SpillReplayPool now covers its replay. What Final still gets is the name exemption in limited_to_its_share. Removing the switch also means removing the Final path in merge_as_partial.rs, and the #6880 JVM tests need to confirm it, so I filed #7765 for that. The comment now says why the switch exists and links the issue. (1100221)

Comment thread native/core/src/execution/delta_dv.rs Outdated
// `out[0]`'s extensions) and the clone are live at once, exactly like the real reader.
let cloned_plan = attached_plan.clone();
let metadata = read_metadata_with_page_index(&path);
// Deprecated in DataFusion 56 in favor of row-group-local entries; these tests still model

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the reader now keeps row-group-local entries, does reader_peak_bytes still bound the real peak? If that needs a separate look, could you file an issue and link it here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It still bounds it. In 56, ParquetAccessPlan::prepare moves each row group's selection into the push decoder (access_plan.rs:633-693, opener/mod.rs:1761-1773), so the combined selection that term 3 modelled is no longer allocated. What replaced it is the decoder's peek_next_row_group clone of the remaining row groups at row-group boundaries (exact-length) and the active row group's clone. Both are at most selectors, which is less than term 3's 2 * selectors + 6 * num_row_groups. So the bound is a little looser than before, but still an upper bound. I updated the doc comments on reader_peak_bytes and on the reservation, and the comments on the three tests, to say so. (8ebda31)

/// - a `Dictionary` nested in a list/map: `SparkXxhash64` restarts those hashes from 42
/// - `Struct` (and anything containing one): before DataFusion 56, `SparkXxhash64` did not push
/// a parent null mask into children, so hidden values of a NULL struct would affect the hash
/// (fixed by apache/datafusion#25774)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two of the reasons for keeping the Comet kernel no longer hold. Could you either widen the routing here or file an issue for it and link it from this comment?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Filed #7764 and linked it from the comment. Widening the routing changes which kernel runs for struct and nested dictionary input, so it should come with benchmarks of both kernels. I'd rather keep that out of the upgrade. (1100221)

andygrove and others added 6 commits November 25, 2026 07:33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and turn its CI job back on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…adroom back before the replay

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…taFusion 56

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…routing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andygrove

Copy link
Copy Markdown
Member Author

Thanks for the review. Inline replies are in each thread. On the two general points:

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @andygrove for carrying this upgrade. This review covers only the code comments the upgrade adds or makes stale. Several new comments narrate what DataFusion 55 or arrow 59 did and how 56 or 60 changed it. That history belongs in the PR description and the commit message. A comment should describe the code as it is now, and these will be wrong again at the next upgrade.

The upgrade also makes three comments outside the diff stale.

merge_rows.rs says to go back to and_not once Comet is on arrow 60. The fix for apache/arrow-rs#10698 (apache/arrow-rs#10699) is in 60.1.0. Could we switch back here, or drop the comment if and(.., not(..)) stays?

audit.toml says the zstd advisories are blocked on the arrow 60 upgrade. With this PR arrow-ipc 60.1.0 resolves to zstd 0.14.3, but native/Cargo.lock still has zstd 0.13.3 through datafusion-comet-shuffle (zstd = "0.13.3"), iceberg, and apache-avro. Could you update the comment to name what blocks it now?

topk/reader.rs clears incomplete column statistics because DataFusion 55.1 reads an omitted null_count as zero (apache/datafusion#25239). The fix, apache/datafusion#25242, is in 56.0.0 and in no 55.x release. Is the workaround still needed? If it is, the comment should say why. If not, could we remove it here, since the upgrade is what makes it dead code?

Comment thread native/Cargo.toml Outdated
Comment on lines +89 to +90
# The next main revision, 986153c, moves iceberg-rust to opendal 0.59, which needs
# Comet's opendal and object_store_opendal to move with it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The next iceberg-rust revision and what it would pull in is a note for the PR, and the SHA goes stale with the next bump. Could we drop these two lines and file an issue for moving iceberg-rust to opendal 0.59, so the follow-up the description lists is tracked?

Suggested change
# The next main revision, 986153c, moves iceberg-rust to opendal 0.59, which needs
# Comet's opendal and object_store_opendal to move with it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Dropped, and filed #7767 for moving iceberg-rust to opendal 0.59. The description links it. (b5c92ca)

Comment thread native/comet-test-udfs/src/lib.rs Outdated
Comment on lines +302 to +311
/// `(Int64) -> Map(String, Int32)` built through arrow-rs's default
/// [`MapBuilder`].
/// `(Int64) -> Map(String, Int32)` built through a [`MapBuilder`] with
/// explicit field names.
///
/// That builder names the map's children `entries` / `keys` / `values`,
/// where Comet's own Spark-to-Arrow conversion emits `entries` / `key` /
/// `value`. Those names are positional in the Arrow format, so the two
/// spellings have to be accepted interchangeably; this UDF is what proves
/// it end to end, since `echo_c` hands back the map Comet gave it and so
/// always carries Comet's own names.
/// The names are `entries` / `keys` / `values`, which is what arrow-rs's
/// default builder used before arrow 60 changed its default to `entries` /
/// `key` / `value`. Comet's own Spark-to-Arrow conversion emits the latter.
/// Those names are positional in the Arrow format, so the two spellings
/// have to be accepted interchangeably; this UDF is what proves it end to
/// end, since `echo_c` hands back the map Comet gave it and so always
/// carries Comet's own names.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new text explains what arrow-rs's default was before arrow 60. A reader needs only the names this builder uses and the names Comet emits. Main's wording already said that, so it can stay with the explicit names:

Suggested change
/// `(Int64) -> Map(String, Int32)` built through arrow-rs's default
/// [`MapBuilder`].
/// `(Int64) -> Map(String, Int32)` built through a [`MapBuilder`] with
/// explicit field names.
///
/// That builder names the map's children `entries` / `keys` / `values`,
/// where Comet's own Spark-to-Arrow conversion emits `entries` / `key` /
/// `value`. Those names are positional in the Arrow format, so the two
/// spellings have to be accepted interchangeably; this UDF is what proves
/// it end to end, since `echo_c` hands back the map Comet gave it and so
/// always carries Comet's own names.
/// The names are `entries` / `keys` / `values`, which is what arrow-rs's
/// default builder used before arrow 60 changed its default to `entries` /
/// `key` / `value`. Comet's own Spark-to-Arrow conversion emits the latter.
/// Those names are positional in the Arrow format, so the two spellings
/// have to be accepted interchangeably; this UDF is what proves it end to
/// end, since `echo_c` hands back the map Comet gave it and so always
/// carries Comet's own names.
/// `(Int64) -> Map(String, Int32)` built through a [`MapBuilder`] whose
/// children are named `entries` / `keys` / `values`, where Comet's own
/// Spark-to-Arrow conversion emits `entries` / `key` / `value`. Those names
/// are positional in the Arrow format, so the two spellings have to be
/// accepted interchangeably; this UDF is what proves it end to end, since
/// `echo_c` hands back the map Comet gave it and so always carries Comet's
/// own names.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied. (b5c92ca)

Comment thread native/core/src/execution/delta_dv.rs Outdated
Comment on lines +367 to +374
/// 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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Term 3 still models into_overall_row_selection. DataFusion 56 deprecates it, and the reader no longer calls it. The opener now moves each row group's selection into the decoder. So the doc describes an allocation that no longer happens, then adds a sentence saying it still covers the one that does.

Could we rewrite term 3 to describe the copies 56 makes, with the bound from #7249 (comment)? The same DataFusion 55 model is at lines 389-394, 428, 712, and 912, and the measured allocator peaks below the formula were taken on the old path. If the formula stays larger than 56 needs on purpose, one sentence saying so is enough.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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. (a87c14f)

Comment thread native/core/src/execution/delta_dv.rs Outdated
Comment on lines +2115 to +2118
/// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test and the two below it now check the reservation against a deprecated function the reader doesn't run. Lines 2119-2122 say exercising the real dependency keeps the test honest across upgrades, and line 2335 says the call mirrors "how the real reader calls it". Neither holds on 56. The tests also stop compiling when DataFusion removes into_overall_row_selection.

Could these tests measure what 56 allocates instead? ParquetAccessPlan::prepare is pub(crate), so that likely means scanning the file with the plan attached. If that doesn't fit in this PR, could you file an issue for it and change the docs and the comments at lines 2167, 2239, and 2339 to say what the tests check now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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. (a87c14f)

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR drops "DataFusion 55.2" from the doc at line 221, but this line, line 254, line 1048, and line 1109 still name 55.2 for behavior Comet now gets from 56. Line 1048 sits right under the new "DataFusion 56" text at line 1044. Could we drop the version from these as line 221 does, after checking that 56 still behaves as each one says?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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...". (b5c92ca)

Comment on lines +480 to +481
// The same import `RecordBatchStreamReader::next` performs. (Arrow 60 made the
// `FFI_ArrowArrayStream` callbacks private, so a hand-rolled stream is no longer possible.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The parenthetical explains why the test doesn't build a stream, which is worth keeping. It can say that in the present tense:

Suggested change
// The same import `RecordBatchStreamReader::next` performs. (Arrow 60 made the
// `FFI_ArrowArrayStream` callbacks private, so a hand-rolled stream is no longer possible.)
// The same import `RecordBatchStreamReader::next` performs. The `FFI_ArrowArrayStream`
// callbacks are private, so the test can't build a stream for the reader to import.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied. (b5c92ca)

Comment on lines +257 to +263
// A PartialMerge over input sorted on some of its keys runs as Final, as a
// ClusteredFinalAggregateStream, which the fair pool exempts from its fair limit
// (`limited_to_its_share`). It was added because DataFusion 55 ran Single there with the
// legacy GroupedHashAggregateStream, whose spill could fail against that limit (#6880).
// DataFusion 56 runs Single there as a ClusteredSingleAggregateStream, which spills, so
// this may no longer be needed (#7765). MergeAsPartial evaluates to its state
// under Final as under Single.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The reason this switch exists today is the fair pool's exemption for Final. How DataFusion 55 ran Single is history, and #7765 already holds the question of whether 56's Single would do. Could we keep the why and drop the versions?

Suggested change
// A PartialMerge over input sorted on some of its keys runs as Final, as a
// ClusteredFinalAggregateStream, which the fair pool exempts from its fair limit
// (`limited_to_its_share`). It was added because DataFusion 55 ran Single there with the
// legacy GroupedHashAggregateStream, whose spill could fail against that limit (#6880).
// DataFusion 56 runs Single there as a ClusteredSingleAggregateStream, which spills, so
// this may no longer be needed (#7765). MergeAsPartial evaluates to its state
// under Final as under Single.
// A PartialMerge over input sorted on some of its keys runs as Final, as a
// ClusteredFinalAggregateStream, which the fair pool exempts from its fair limit
// (`limited_to_its_share`). #7765 tracks whether Single, which runs a
// ClusteredSingleAggregateStream there, would now do. MergeAsPartial evaluates to its
// state under Final as under Single.

The module doc in merge_as_partial.rs gives the same DataFusion 55 reason ("Single falls back to a stream whose spill can ask for more than its share"), which no longer holds on 56. Could it get the same rewrite?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied, and rewrote the merge_as_partial.rs module doc the same way: it now says Final runs as a ClusteredFinalAggregateStream that the fair pool exempts, and that #7765 tracks whether Single would do. I also dropped "from DataFusion 56" from its PartialReduce sentence. (b5c92ca)

Comment on lines +986 to +990
// Arrow 59 rejected both dictionaries only for their empty entry, which Arrow 60 accepts
// (apache/arrow-rs#10352), so they no longer reach the empty-key retry. Arrow does not reject
// the rest: an unsorted dictionary may repeat an entry, and bytes after the last offset are
// never read. The row passes through unchanged, as in Spark, which checks only the offsets
// of the keys it looks up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Arrow 59 rejected both dictionaries only for their empty entry, which Arrow 60 accepts
// (apache/arrow-rs#10352), so they no longer reach the empty-key retry. Arrow does not reject
// the rest: an unsorted dictionary may repeat an entry, and bytes after the last offset are
// never read. The row passes through unchanged, as in Spark, which checks only the offsets
// of the keys it looks up.
// Arrow accepts an empty entry in an unsorted dictionary (apache/arrow-rs#10352), so these
// don't reach the empty-key retry. Arrow does not reject the rest: an unsorted dictionary
// may repeat an entry, and bytes after the last offset are never read. The row passes
// through unchanged, as in Spark, which checks only the offsets of the keys it looks up.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied. (b5c92ca)

Comment on lines +38 to +39
//! | Struct NULL with hidden children | yes since DataFusion 56 (apache/datafusion#25774), but not routed |
//! | List&lt;Dictionary&gt; | yes since DataFusion 56 (apache/datafusion#25813), but not routed |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"Since DataFusion 56" is history once Comet moves past 56. The table only needs the current state and where the routing is tracked:

Suggested change
//! | Struct NULL with hidden children | yes since DataFusion 56 (apache/datafusion#25774), but not routed |
//! | List&lt;Dictionary&gt; | yes since DataFusion 56 (apache/datafusion#25813), but not routed |
//! | Struct NULL with hidden children | yes (apache/datafusion#25774), but not routed (#7764) |
//! | List&lt;Dictionary&gt; | yes (apache/datafusion#25813), but not routed (#7764) |

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied. (b5c92ca)

Comment on lines +803 to +804
/// `SparkXxhash64` used to hash the hidden child values of a NULL struct. DataFusion 56 fixed it
/// (apache/datafusion#25774), so upstream now agrees with the Comet kernel here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test name and the assertion message already say that upstream matches the Comet kernel here. What SparkXxhash64 used to do is history. Could we drop this doc, the one at lines 1039-1040, and the comment at lines 1184-1185?

Suggested change
/// `SparkXxhash64` used to hash the hidden child values of a NULL struct. DataFusion 56 fixed it
/// (apache/datafusion#25774), so upstream now agrees with the Comet kernel here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed all three. (b5c92ca)

andygrove and others added 4 commits November 25, 2026 09:22
arrow 60.1 fixes and_not for inputs with a non-zero offset
(apache/arrow-rs#10698), so the and(.., not(..)) workaround is no longer
needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DataFusion 56 reads an omitted null_count as unknown
(apache/datafusion#25242), so the TopK no longer needs to clear incomplete
statistics before attaching its filter to the Parquet reader, or to skip
attachment when the scan has a static predicate. It now attaches through
try_attach_parquet_reader_filter like the min/max and join filters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Term 3 now describes the copies DataFusion 56's reader makes, and says the
formula keeps the larger file-level charge on purpose. The three tests that
use into_overall_row_selection say they check the formula, not the reader.
#7766 tracks measuring the reader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop DataFusion and arrow version history from comments the upgrade added
or made stale, and name what still pulls in zstd 0.13 in audit.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andygrove

Copy link
Copy Markdown
Member Author

Thanks @mbutrovich. Inline replies are in each thread. On the three comments outside the diff:

  • merge_rows.rs is back on and_not. arrow 60.1 has the fix, and not_matched_masks_with_sliced_markers passes with it. (f68b88b)
  • audit.toml now says zstd 0.13 comes from Comet's own native/shuffle, and from iceberg and its apache-avro 0.22, which both require zstd ^0.13. (b5c92ca)
  • The TopK null-count workaround is gone. With it turned off, both of its end-to-end tests (topk_preserves_unknown_null_counts_and_prunes_known_zero_counts and direct_null_check_retains_attachment_with_unknown_null_counts) pass on 56, so I removed topk/reader.rs and its unit test. The TopK now attaches through try_attach_parquet_reader_filter like the min/max and join filters. That also drops the check that skipped attachment when the scan has a static predicate, which existed only because clearing statistics could expose a file the predicate excluded. static_range_with_unknown_null_count_keeps_hiding_an_excluded_file (renamed from ..._skips_reader_attachment) now asserts the filter attaches and the static predicate still hides that file. (2447840)

The description is updated to match.

@viirya viirya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for working through all of this so quickly. The follow-up issues, the #7541 test and the TopK cleanup all look good to me. I replied in three of the threads. The SpillReplayPool one is what's still blocking.

@sunchao sunchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @andygrove, the write-up makes this easy to review. The source changes look mechanical and right to me. I have one likely issue in the fair pool and one thing to confirm for TopK.

1. fair_pool.rs, limited_to_its_share

spill_replay.rs now treats ClusteredSingleAggregateStream as a final aggregate, but the fair pool exemption still covers only ClusteredFinalAggregateStream[. The planner keeps Single for a PartialMerge over fully sorted input ("with fully sorted input Final has no spill path"). On DataFusion 56 that runs as ClusteredSingleAggregateStream with GroupClusteringMode::Full. If that stream, like the Final one, registers as spillable (the apache/datafusion#17334 workaround) but has no spill path when fully sorted, a refusal at the fair limit would fail the query. On 55 it ran as GroupedHashAggregateStream, which could spill.

Could you check whether it needs the same exemption? A test like a_sort_that_fills_the_share_leaves_room_for_the_final_aggregate_above_it, using a Single aggregate over a fully sorted input, would settle it.

2. topk.rs, build_runtime_sort

The reader gets the filter produced by sort, and then sort is rebuilt through replace_children. This relies on SortExec::with_new_children keeping the same DynamicFilterPhysicalExpr rather than creating a fresh one. Otherwise the reader's filter never tightens, which costs performance but not correctness. I believe live_threshold_reaches_remapped_parquet_column_and_prunes_later_groups would catch that. Could you confirm it ran on this branch? An explicit check that produced_topk_filter on the rebuilt sort returns the same expression id as the reader's filter would make it obvious.

3. Minor: join.rs, install_probe_filter

Is the .builder().build() round trip only to get an owned HashJoinExec from the Arc<dyn ExecutionPlan>? If so, would .clone() after the downcast be clearer? It would also avoid any doubt about whether the builder keeps the dynamic filter we just installed.

Heads-up on merge order: #6246 adds a parameter to init_datasource_exec and touches about 25 test call sites, so whichever of the two lands second needs a rebase. I checked their logic against each other. #6246 reads top-level strings as Binary and decodes them, which sidesteps the file-schema coercion that apache/datafusion#25193 makes recursive, so they shouldn't conflict beyond the signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:aggregation Hash aggregates, aggregate expressions area:Delta Delta Lake contrib (native scan, deletion vectors) area:expressions Expression evaluation area:ffi Arrow FFI / JNI boundary area:Iceberg area:joins Join operators and dynamic filter pushdown area:memory Memory pools, reservations, OOM handling area:scan Parquet scan / data reading area:shuffle Shuffle (JVM and native) dependencies Pull requests that update a dependency file run-all-spark-profiles Run the Comet test suites against every Spark profile on this pull request, ahead of the merge queue run-iceberg-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ANY_VALUE memory regression in Comet 1.2.0

4 participants