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

Fix #15659: VARCHAR parameters now count as STRING_LITERAL again #15724

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Mytherin
Copy link
Collaborator

Fixes #15659

This partially reverts #12759 for VARCHAR columns.

Previously parameters would always count as literals - i.e. passing in a parameter 1 would bind as an INTEGER_LITERAL, and a parameter 'str' would bind as a string literal. This matters because literals have special binding rules where they adopt surrounding types, so string literals can be used as dates, but VARCHAR columns cannot (see literal typing here)

For integer literals this fixes issues where types were ignored causing overflow errors when used in conjunction with smaller integer types. For string literals, however, this can cause previously working code to now throw binder errors. This PR reverts the behavior so that the code in the linked issue works again.

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.

Regression in parameterized BETWEEN clause in 1.1
1 participant