Skip to content

Tmp single threaded experiment#324

Closed
benfleis wants to merge 7 commits into
duckdb:mainfrom
benfleis:TMP-single-threaded-experiment
Closed

Tmp single threaded experiment#324
benfleis wants to merge 7 commits into
duckdb:mainfrom
benfleis:TMP-single-threaded-experiment

Conversation

@benfleis

@benfleis benfleis commented Jul 4, 2026

Copy link
Copy Markdown
Member

windows test, no commit

benfleis added 7 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.
@benfleis benfleis closed this Jul 7, 2026
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