Skip to content

Forward fill v1.5 variegata PRs -> main#325

Merged
benfleis merged 12 commits into
duckdb:mainfrom
benfleis:forward-fill-v1.5-variegata-changes
Jul 8, 2026
Merged

Forward fill v1.5 variegata PRs -> main#325
benfleis merged 12 commits into
duckdb:mainfrom
benfleis:forward-fill-v1.5-variegata-changes

Conversation

@benfleis

@benfleis benfleis commented Jul 4, 2026

Copy link
Copy Markdown
Member

forward-port v1.5 PRs to main

Forward-ports:

Follow-up fixes (adaptation to duckdb-main)

  • Add support for version parameter for delta_scan  #312 — re-wire version through the new MultiFileReader
    ParseOption/Bind signatures (requested_version + PinVersion), register
    the named param in delta_scan.cpp, propagate via delta_table_entry.
  • More test var updates: TEST_DIR -> {TEMP_DIR}

benfleis added 11 commits July 1, 2026 08:47
src/delta_utils.cpp — PredicateVisitor::VisitFilterExpression:

- Added ResolveFilterColumnPath, which walks struct_extract / struct_extract_at subjects (via duckdb's TryGetStructExtractChildIndex +
StructType::GetChildName) and rebuilds the dotted kernel path, e.g. i.a.b. Bare column refs still resolve to the top-level name.
- Added a guard: a bare ref on a nested (struct/list/map) column is skipped. The instrumentation showed the same predicate arrives twice —
once as struct_extract(struct_extract(i,'a'),'b') > 10 (resolvable) and once as #0 > 10 (path lost). The second was being pushed as a filter
on i (a struct) → MissingColumnError. The struct_extract form still gives the kernel the correct predicate.

src/functions/delta_scan/delta_multi_file_list.cpp — ReportFilterPushdown: made the file-count reporting tolerate multi-pass pushdown (keep
max total_files / min filtered_files instead of asserting equality). Now that struct filters actually skip files, projecting i.a.b makes
RemoveUnusedColumns re-run pushdown on the already-shrunken list, which tripped the old *_inconsistent assertions.

Verification

- write_stats_nested.test: 28 assertions, all pass (was erroring at :42).
- Full test/*: 11 → 8 failures, no regressions. The struct test and both golden-table tests now pass; file-skipping counts (Scanning Files:
1/5, 0/2, 1/2) are correct.

The remaining 8 are the non-struct items already triaged:
1. Partition-value type crash (part = 42 / part IS NULL) — real, duckdb#303 lineage, HIGH.
2. Stale .test fixtures vs new duckdb rendering (filter strings, EXPLAIN text, stats()) — LOW.
3. incremental_snapshot extra log reads — needs investigation, LOW.
DeltaMultiFileReader::BindOptions forwarded partition columns via hive_partitioning_indexes but never registered their types. Core's
GetHivePartitionValue defaults an unregistered partition column to VARCHAR, so the parsed value ("42") stayed VARCHAR while the pushed
ExpressionFilter was typed BIGINT → Vector::Reference type-mismatch crash in EvaluateWithConstant. One line registers the type:

options.hive_types_schema[part] = return_types[hive_partitioning_index];

Now core resolves the partition constant as the column type (and NULL partitions as a typed NULL), matching what the per-file constant_map
already did via DefaultCastAs.

Verification

- partition_equality_filter__issue_303: 11 assertions pass (was crashing on part = 42).
- write_null_partition: 10 assertions pass (was crashing on part IS NULL).
- Full test/*: 8 → 6 failures, no regressions.
Forward-ports:

- duckdb#312 — Add version parameter for delta_scan
- duckdb#313 — Reject writes to ATTACH … (VERSION N)
- duckdb#319 — UC passthrough of max_catalog_version for staged commits

Follow-up fixes (adaptation to duckdb-main)

- duckdb#312 — re-wire version through the new MultiFileReader
  ParseOption/Bind signatures (requested_version + PinVersion), register
  the named param in delta_scan.cpp, propagate via delta_table_entry.
@benfleis benfleis changed the title Forward fill v1.5 variegata changes [CI TEST] Forward fill v1.5 variegata PRs -> main Jul 8, 2026
@benfleis benfleis merged commit fc7d6ab into duckdb:main Jul 8, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant