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: fix internal error comparing tuple type with non-tuple type #92635

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

msirek
Copy link
Contributor

@msirek msirek commented Nov 29, 2022

Fixes #91532

This fixes comparison of an empty tuple expression, ROW() or (), or
a non-empty tuple expression with a non-tuple type by returning
an error message instead of an internal error.

Release note (bug fix): This fixes an internal error when comparing
a tuple type with a non-tuple type.

@msirek msirek requested review from mgartner, rharding6373 and a team November 29, 2022 00:52
@msirek msirek requested a review from a team as a code owner November 29, 2022 00:52
@msirek
Copy link
Contributor Author

msirek commented Nov 29, 2022

Maybe hold off on review... a few changes coming.

Copy link
Collaborator

@mgartner mgartner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rytaft
Copy link
Collaborator

rytaft commented Nov 29, 2022

Consider adding a backport label for 22.2 and 22.1

Fixes cockroachdb#91532

This fixes comparison of an empty tuple expression, ROW() or (), or
a non-empty tuple expression with a non-tuple type by returning
an error message instead of an internal error.

Release note (bug fix): This fixes an internal error when comparing
a tuple type with a non-tuple type.
Copy link
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pkg/sql/sem/tree/type_check.go Show resolved Hide resolved
@msirek
Copy link
Contributor Author

msirek commented Nov 29, 2022

TFTRs!
bors r=rytaft,mgartner

@craig
Copy link
Contributor

craig bot commented Nov 30, 2022

Build succeeded:

@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.

sql: query causes Internal Error
4 participants