Fix GH-10801: Named arguments in CTE functions cause a segfault #10811
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.
Fixes GH-10801
Named arguments are not supported by the constant evaluation routine, in the sense that they are ignored. This causes two issues:
This case never worked anyway, leading to crashes or incorrect behaviour, so just prevent CTE of calls with named parameters for now. We can choose to support it later, but introducing support for this in a stable branch seems too dangerous.
This patch does not change the removal of SEND_* opcodes in remove_call because the crash bug can't be triggered anymore with this patch as there are no named parameters anymore and no variadic CTE functions exist.
Question
I do have the patch already on my machine to support named arguments & variadics in the
remove_call
function, which solves bullet point 1. If we're interested in supporting named arguments in CTE, I can write the code to actually pass the named arguments during CTE, which would solve bullet point 2. This would make CTE possible with named arguments. Is this something we want?