Skip to content

union.TagsRLE: Only build if dynamic.Tags is non nil#7145

Open
mattnibs wants to merge 1 commit into
mainfrom
tags-rle-empty
Open

union.TagsRLE: Only build if dynamic.Tags is non nil#7145
mattnibs wants to merge 1 commit into
mainfrom
tags-rle-empty

Conversation

@mattnibs

Copy link
Copy Markdown
Collaborator

This commit fixes an issue with union.TagsRLE() which was returning the wrong value on union RLEs with all zeros encoded. Only build RLE if dynamic.Tags is not nil.

Closes #7140

@mattnibs
mattnibs requested a review from a team July 23, 2026 20:49
@mattnibs
mattnibs force-pushed the tags-rle-empty branch 2 times, most recently from 8ee31a1 to 4b98ff2 Compare July 23, 2026 20:51
This commit fixes an issue with union.TagsRLE() which was returning
the wrong value on union RLEs with all zeros encoded. Only build RLE if
dynamic.Tags is not nil.

Closes #7140
Comment thread vector/union.go

func (u *Union) TagsRLE() []uint32 {
if u.rle == nil {
if u.dynamic.Tags != nil && u.rle == nil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What creates a vector.Union with a nil dynamic.Tags and nil u.rle? Is that something that can happen when the length of the rle is zero?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

An rle with all zeros is nil

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.

CSUP corruption with nullable union values

2 participants