Skip to content

fix: decode constant list struct children#6801

Merged
Xuanwo merged 2 commits into
mainfrom
xuanwo/fix-constant-list-struct-decoding
May 18, 2026
Merged

fix: decode constant list struct children#6801
Xuanwo merged 2 commits into
mainfrom
xuanwo/fix-constant-list-struct-decoding

Conversation

@Xuanwo
Copy link
Copy Markdown
Collaborator

@Xuanwo Xuanwo commented May 15, 2026

Fixes #6776.

When a constant-encoded child appears under List<Struct<...>>, empty list rows must not count as visible child values. The constant decoder was summing definition levels across the whole path, including levels after the list boundary, so a constant sibling could materialize parent-row counts while non-constant siblings materialized list-item counts.

This matches the visible-level boundary used by the miniblock and complex all-null decoders, and adds regression coverage for a constant struct child followed by empty lists under a nullable parent struct. Verified with the targeted encoding test and the dataset attached to #6776.

@github-actions github-actions Bot added the bug Something isn't working label May 15, 2026
@Xuanwo Xuanwo marked this pull request as ready for review May 15, 2026 18:28
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Xuanwo Xuanwo merged commit 7c25442 into main May 18, 2026
34 of 36 checks passed
@Xuanwo Xuanwo deleted the xuanwo/fix-constant-list-struct-decoding branch May 18, 2026 07:21
wjones127 pushed a commit that referenced this pull request May 20, 2026
Fixes #6776.

When a constant-encoded child appears under `List<Struct<...>>`, empty
list rows must not count as visible child values. The constant decoder
was summing definition levels across the whole path, including levels
after the list boundary, so a constant sibling could materialize
parent-row counts while non-constant siblings materialized list-item
counts.

This matches the visible-level boundary used by the miniblock and
complex all-null decoders, and adds regression coverage for a constant
struct child followed by empty lists under a nullable parent struct.
Verified with the targeted encoding test and the dataset attached to
#6776.

(cherry picked from commit 7c25442)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pylance 6.0 write nested struct data with data storage version 2.2 crashed

2 participants