Skip to content

Fix Offset Overflow during stale_files call - #64

Merged
wyatt-herkamp merged 1 commit into
branch-55from
wyatt/group-row-metadata-by-partition
Oct 8, 2026
Merged

wyatt-herkamp merged 1 commit into
branch-55from
wyatt/group-row-metadata-by-partition

Conversation

@wyatt-herkamp

@wyatt-herkamp wyatt-herkamp commented Oct 5, 2026 •

Copy link
Copy Markdown

Row metadata scans emitted one row per source file. Since every file in a partition shares the same partition values, each join on those values paired files instead of partitions, multiplying rows by the file count once per join. Views joining tables with many files per partition (e.g. hash-binned files) could produce enough __meta list data in a single batch to overflow Arrow's 32-bit offsets.

scan_columns_from_row_metadata now groups the row metadata by the scan's partition columns and collects the files with array_agg, so each scan yields one row per partition. Dependency output is unchanged.

Adds test_binned_self_join_does_not_multiply_files: a 3-way self-join over a partition with 4 files went from 64 rows to 1.

@wyatt-herkamp
wyatt-herkamp marked this pull request as ready for review October 5, 2026 14:58
@wyatt-herkamp
wyatt-herkamp merged commit c7ee976 into branch-55 Oct 8, 2026
16 checks passed
@wyatt-herkamp
wyatt-herkamp deleted the wyatt/group-row-metadata-by-partition branch October 8, 2026 12:50
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.

3 participants