Skip to content

fix(PartitionedOutput): Add int128 converter in PrestoIterativePartitioningSerializer - #2459

Open
xin-zhang2 wants to merge 4 commits into
IBM:optimized_partitionedoutputfrom
xin-zhang2:PartitionedOutput-int128
Open

fix(PartitionedOutput): Add int128 converter in PrestoIterativePartitioningSerializer#2459
xin-zhang2 wants to merge 4 commits into
IBM:optimized_partitionedoutputfrom
xin-zhang2:PartitionedOutput-int128

Conversation

@xin-zhang2

Copy link
Copy Markdown
Member

No description provided.

yingsu00 and others added 3 commits August 21, 2026 10:45
`PrestoIterativePartitioningSerializer` can now serialize struct columns,
including structs nested inside structs, with nulls at any level.

Serializing a struct column does not write into the vector handed to
`append()`. Given `ROW(ROW(ROW(INTEGER)))` where the outer struct is null at
row 0 and the inner struct is null at row 2, combining the rows the outer
struct discards back into the caller's own null bitmap would leave the
caller's inner struct reporting two nulls instead of one, so the mask that
tells a child which rows survive is built separately: only when a level
really drops rows, and in a buffer of its own when both the level and an
ancestor drop rows.

A struct whose null bitmap is allocated but holds no null does not count as
having nulls. Such a bitmap drops no row, so treating it as nullable would
reject `ROW(ROW(VARCHAR))` with "Variable-width columns nested under a ROW
with nulls are not supported" and push fixed-width leaves off the bulk copy
path onto one stream write per value.

A struct column can arrive CONSTANT-encoded, which produces a
`PartitionedConstantVector`; that is reported as an unsupported encoding
rather than relying on a cast that returns null.

The ROW block footer reuses the same null-section writer as simple columns
instead of repeating the Velox-to-Presto bitmap conversion.

Also adds nested-ROW coverage to the benchmarks: the `PartitionedVector` type
generator was off by one nesting level, so its one-level case built a plain
BIGINT column, and `ExchangeBenchmark` reused a single null window at every
level, so no level ever discarded a row its child would otherwise have
written. An unused `PartitionedVector` setter and a test that asserted
nothing are removed.
@xin-zhang2
xin-zhang2 requested a review from yingsu00 August 27, 2026 20:18
@xin-zhang2
xin-zhang2 force-pushed the PartitionedOutput-int128 branch from 1dd0397 to 5d5005d Compare September 1, 2026 13:43
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.

2 participants