Skip to content

Conversation

@mattnibs
Copy link
Collaborator

When getting the value of a primitive const at a given slot, report the value as null if the base value is null.

When getting the value of a primitive const at a given slot, report the
value as null if the base value is null.
@mattnibs mattnibs requested a review from a team December 29, 2025 21:26
return vec.Bits.IsSet(slot), vec.Nulls.IsSet(slot)
case *Const:
return vec.Value().Ptr().AsBool(), vec.Nulls.IsSet(slot)
return vec.Value().Ptr().AsBool(), vec.val.IsNull() || vec.Nulls.IsSet(slot)
Copy link
Member

Choose a reason for hiding this comment

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

I really think this is the wrong approach and that the nulls vector should be the source of truth, with the implication that a vector.Const with a null super.Value should always have every bit set in its nulls vector.

Copy link
Collaborator Author

@mattnibs mattnibs Dec 29, 2025

Choose a reason for hiding this comment

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

I don't feel strongly about this but I'd like to make sure this works someday in the near future. I can't assess whether what you are proposing is a quick fix.

Copy link
Member

Choose a reason for hiding this comment

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

Check out #6477.

@mattnibs mattnibs closed this Dec 30, 2025
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