Skip to content

[core] Keep first_non_null_value when an older sequence-group record is null - #10990

Draft
chenjian2664 wants to merge 1 commit into
apache:masterfrom
chenjian2664:chenjian2664/bytequay/find-core-contribution
Draft

chenjian2664 wants to merge 1 commit into
apache:masterfrom
chenjian2664:chenjian2664/bytequay/find-core-contribution

Conversation

@chenjian2664

Copy link
Copy Markdown
Contributor

Purpose

In partial-update tables, a field using first_non_null_value inside a sequence group loses its value when a late record with an older sequence value has a null in that field: the older record overwrites the stored value with null. This affects out-of-order partial-update streams, such as CDC with late events.

PartialUpdateMergeFunction aggregates older records through aggReversed, whose default swaps the arguments, so first_non_null_value returns the null input. Override aggReversed so an older non-null value takes precedence and an older null keeps the current value.

Tests

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