Conversation
…single array vs multiple arrays
Contributor
|
is this breaking? |
Collaborator
Author
|
I guess every bug fix is breaking if someone was depending on the buggy behaviour |
izeigerman
approved these changes
Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4536
Prior to this, the following behavior occurred:
That last item is unexpected, it should be
SELECT ARRAY(1)because@eachreturns 1 item of type array.Unfortunately,
_norm_var_arg_lambda()assumes this item is varargs and unpacks it, rather than passing it as-is.Sometimes, we do actually want it to be unpacked though. If we didnt,
select @each([1, 2], a -> [@a])would result inSELECT ARRAY(ARRAY(1), ARRAY(2))instead ofSELECT ARRAY(1), ARRAY(2).So this PR wraps the output of a macro function in an extra
exp.Arrayto prevent_norm_var_arg_lambda()from treating it as varargs, but only if it's being used as input to another function, which preserves the semantics of still unpacking it for aSELECTcolumn list.