Skip to content

[HSTACK] feat: add option to modify the low-level Delta schema to make some fields nullable ADDENDUM - #25

Merged
VLCDaniel merged 1 commit into
main-1.0-statsfrom
next-nullable-filter-fix
Oct 19, 2026
Merged

VLCDaniel merged 1 commit into
main-1.0-statsfrom
next-nullable-filter-fix

Conversation

@VLCDaniel

@VLCDaniel VLCDaniel commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

aep_dataset_next queries with a partition filter (e.g. WHERE ACP_DATE >= …) fail with:
Found unmasked nulls for non-nullable StructArray field "rowId"

Why:
The parquet read schema already gets the DELTA_FIELD_PATHS_TO_MAKE_NULLABLE overrides. But when a file needs a kernel transform, for example to add partition columns, DeltaScanStream evaluates it against scan.logical_schema(). That schema still has the original strict Delta nullability. The kernel rebuilds the structs with that schema, and Arrow rejects the nulls. Without a partition filter, no transform runs, which is why those queries work.

Fix:
In DeltaScanExec::execute, build the transform output type from the logical schema with the existing rewrite_schema_with_nullable_fields applied (kernel → Arrow → rewrite → kernel). Column-mapped partitioned tables (table_with_partitioning_mapping, table_with_column_mapping) read correctly through this path.

Related Issue(s)

Documentation

@github-actions

Copy link
Copy Markdown

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@VLCDaniel
VLCDaniel force-pushed the next-nullable-filter-fix branch from 362411c to 96d3b92 Compare October 19, 2026 13:48
@VLCDaniel
VLCDaniel force-pushed the next-nullable-filter-fix branch from 96d3b92 to a863c8e Compare October 19, 2026 14:39
@VLCDaniel VLCDaniel changed the title apply nullable-field overrides to kernel transform output schema [HSTACK] feat: add option to modify the low-level Delta schema to make some fields nullable ADDENDUM Oct 19, 2026
@VLCDaniel
VLCDaniel merged commit b856920 into main-1.0-stats Oct 19, 2026
2 of 5 checks passed
@VLCDaniel
VLCDaniel deleted the next-nullable-filter-fix branch October 19, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant