Skip to content

vam: fix panic in upcast()#7006

Draft
nwt wants to merge 1 commit into
mainfrom
vam-upcast-panic
Draft

vam: fix panic in upcast()#7006
nwt wants to merge 1 commit into
mainfrom
vam-upcast-panic

Conversation

@nwt
Copy link
Copy Markdown
Member

@nwt nwt commented May 28, 2026

runtime/vam/expr/function.Upcast.deunionAndUpcast does not change the type of zero-length vectors. This causes trouble because the vectors passed to vbuild.MergeSameTypesInDynamic then have multiple types, causing that function to return a vector.Dynamic instead of the expected vector with the target type. Fix by changing the type of zero-length vectors to the target type in deunionAndUpcast and then skipping zero-length vectors in vbuild.Merge.

runtime/vam/expr/function.Upcast.deunionAndUpcast does not change the
type of zero-length vectors.  This causes trouble because the vectors
passed to vbuild.MergeSameTypesInDynamic then have multiple types,
causing that function to return a vector.Dynamic instead of the expected
vector with the target type.  Fix by changing the type of zero-length
vectors to the target type in deunionAndUpcast and then skipping
zero-length vectors in vbuild.Merge.
@nwt nwt requested a review from a team May 28, 2026 22:25
@nwt nwt marked this pull request as draft May 29, 2026 17: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.

1 participant