Skip to content

vam conditionals: Do not deunion values#6926

Closed
mattnibs wants to merge 1 commit intomainfrom
vam-condition-deunion
Closed

vam conditionals: Do not deunion values#6926
mattnibs wants to merge 1 commit intomainfrom
vam-condition-deunion

Conversation

@mattnibs
Copy link
Copy Markdown
Collaborator

@mattnibs mattnibs commented May 7, 2026

This commit fixes an issue in vam conditionals where the values in the then or else expressions where getting deunioned. This changes the approach by using expr.BoolMask to determine the routing of returned values.

Fixes #6907

@mattnibs mattnibs requested a review from a team May 7, 2026 19:53
@mattnibs mattnibs force-pushed the vam-condition-deunion branch 3 times, most recently from 277cca0 to 624eb81 Compare May 7, 2026 21:00
This commit fixes an issue in vam conditionals where the values in the
then or else expressions where getting deunioned. This changes the
approach by using expr.BoolMask to determine the routing of returned
values.

Fixes #6907
@mattnibs mattnibs force-pushed the vam-condition-deunion branch from 624eb81 to 2c8031d Compare May 7, 2026 21:03
}

func (c *conditional) Eval(this vector.Any) vector.Any {
return vector.Apply(true, c.eval, c.predicate.Eval(this), this)
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.

All we need to do is use vector.NoRip here.

	return vector.Apply(true, c.eval, c.predicate.Eval(this), &vector.NoRip{Any: this})

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.

Didn't know about this, let's do it this way

@mattnibs mattnibs closed this May 8, 2026
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.

assert operator de-unions in vector runtime

2 participants