Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree: implement heterogeneous variadic type lists #138106

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mw5h
Copy link
Contributor

@mw5h mw5h commented Dec 30, 2024

Previously, functions could have a VariadicType, which is some number of fixed arguments, followed by a homogeneous list of elements. In b2b7b09, CONCAT()'s implementation was changed to accept arguments of any type, without the homogeneous requirement. The type checker is now rejecting prepared statements with heterogeneous arguments to CONCAT() (and other internal functions that should reasonably accept heterogenous arguments).

This patch introduces a new TypeList that allows any sequence of arguments and uses that type for CONCAT().

Fixes: #136295
Release note (bug fix): PREPARE now accepts heterogeneous arguments to the CONCAT function.

Previously, functions could have a VariadicType, which is some number of
fixed arguments, followed by a homogeneous list of elements. In
b2b7b09, CONCAT()'s implementation was changed to accept arguments
of any type, without the homogeneous requirement. The type checker is
now rejecting prepared statements with heterogeneous arguments to
CONCAT() (and other internal functions that should reasonably accept
heterogenous arguments).

This patch introduces a new TypeList that allows any sequence of
arguments and uses that type for CONCAT().

Fixes: cockroachdb#136295
Release note (bug fix): PREPARE now accepts heterogeneous arguments to
the CONCAT function.
Copy link

blathers-crl bot commented Dec 30, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

CONCAT with integer field and string argument crashes when using server-side cursors
2 participants