Skip to content

Commit dacdc37

Browse files
committed
docs: record apache#3424 backport in DFD_FORK.md
Adds the ledger entry for 9832f9c: upstream links and head SHA, each scan/mod.rs conflict resolution, the base-rev adaptations, why DFD needs it and when to drop it. Upstream-PR: apache#3424 Upstream-head: 86e35d3 Backport-notes: none (docs only) Needed-by: https://github.com/Perseus/datafusion-distributed/tree/iceberg-dyn-filter/f2-fork-column-stats Remove-when: the pinned iceberg-rust rev contains apache#3424's merge commit
1 parent cfd8069 commit dacdc37

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

‎DFD_FORK.md‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,55 @@ When `datafusion-iceberg` moves its iceberg-rust pin to rev `X`:
9595
- **Used by:** only the fork's tests.
9696
- **Remove when:** #3351 is rebased onto a base containing #3145 (then the
9797
upstream test already handles the `Result`), or with entry 1.
98+
99+
### 3. Optional column statistics on `FileScanTask` (apache/iceberg-rust#3424)
100+
101+
- **Fork commit:** `9832f9c7` (manual backport; upstream author Anurag
102+
Mantripragada kept as git author, fork maintainer is committer).
103+
- **Upstream:** PR [apache/iceberg-rust#3424](https://github.com/apache/iceberg-rust/pull/3424),
104+
issue [apache/iceberg-rust#3422](https://github.com/apache/iceberg-rust/issues/3422).
105+
- **Upstream SHA used:** PR head `86e35d3d6365fa3dc1a17be26096f45b2b3e6985`,
106+
net diff against merge base `beba39c8` (all 10 PR commits squashed).
107+
- **Upstream status:** open, not merged (as of 2026-10-24).
108+
- **Backport notes:** `context.rs`, `task.rs`, `test_utils/scan.rs` and
109+
`public-api.txt` applied cleanly with `git apply --3way`; `scan/mod.rs` had 7
110+
conflict hunks, all from upstream changes made after `5b82ab99`. Resolutions:
111+
1. `collect_scan_field_ids`: use the PR's new `require_field_id` helper, as
112+
upstream does. At this base `resolve_field_id` returns `Option<i32>`, not
113+
`Result<Option<i32>>` (that came with
114+
[#3070](https://github.com/apache/iceberg-rust/pull/3070), "reject ambiguous
115+
case-insensitive fields"), so `require_field_id` drops the `?`. Effect:
116+
`with_column_stats` resolves names exactly like `select` does on this base;
117+
an ambiguous case-insensitive name picks a field instead of failing, the same
118+
as `select` here.
119+
2. and 3. `TableScanBuilder` struct and `new`: add `column_stats_names` next to
120+
this base's `snapshot_id` (upstream has `snapshot_selection` from
121+
[#3260](https://github.com/apache/iceberg-rust/pull/3260), time travel).
122+
4. Builder methods: add the PR's `with_column_stats` unchanged; keep this
123+
base's `snapshot_id` method and docs (upstream's docs mention `as_of_time`,
124+
which does not exist here).
125+
5. Test imports: import only `resolve_column_stats_columns` (this base's tests
126+
do not import `resolve_field_id`).
127+
6. Test `spec` imports: this base's list plus the PR's additions, `ListType`
128+
and `StructType`.
129+
7. Tests: add the PR's `nested_schema`, `column_names` and the two
130+
`resolve_column_stats_columns` tests. Not carried: the two
131+
`case_insensitive ... ambiguous` tests, which are #3070's, appear only as
132+
conflict context.
133+
134+
Non-conflict adaptations, needed for the code to compile on this base:
135+
- `task.rs` `bound_as_column_type` calls `Datum::promote_to`, added by
136+
[#3483](https://github.com/apache/iceberg-rust/pull/3483). It is inlined as the
137+
same widening (`int` -> `long`, `float` -> `double`); no `spec` changes.
138+
- Tests build fields with `Type::Primitive(..)`: before
139+
[#3527](https://github.com/apache/iceberg-rust/pull/3527) the `NestedField`
140+
constructors take `Type`, not `impl Into<Type>`.
141+
- `test_utils/scan.rs` imports `SchemaRef`, which upstream already imported.
142+
- **Why DFD needs it:** DFD will skip whole data files by comparing each file's
143+
column min/max with the live dynamic filters, which needs per-file column
144+
statistics on `FileScanTask`.
145+
- **Used by:** the root `Cargo.toml` `[patch]` on
146+
[`iceberg-dyn-filter/f2-fork-column-stats`](https://github.com/Perseus/datafusion-distributed/tree/iceberg-dyn-filter/f2-fork-column-stats).
147+
No DFD code calls `with_column_stats` yet; later changes on top of that
148+
branch will.
149+
- **Remove when:** the pinned iceberg-rust rev contains #3424's merge commit.

0 commit comments

Comments
 (0)