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

sql: allow NULL IN <subquery> to typecheck #49723

Merged
merged 1 commit into from May 31, 2020

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented May 29, 2020

fixes #49651

Release note (sql change): Previously, using NULL (or tuples
containing NULLs) as the left-hand-side of an IN operator would not
typecheck unless the NULLs were explicitly casted. Now, the casting is
not required.

Release note (sql change): Previously, using NULL (or tuples
containing NULLs) as the left-hand-side of an IN operator would not
typecheck unless the NULLs were explicitly casted. Now, the casting is
not required.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

LGTM! That was easier than expected.

@rafiss
Copy link
Collaborator Author

rafiss commented May 31, 2020

tftr!

bors r=jordanlewis

@craig
Copy link
Contributor

craig bot commented May 31, 2020

Build succeeded

@craig craig bot merged commit 1422dd5 into cockroachdb:master May 31, 2020
@rafiss rafiss deleted the null-in-tuple branch May 31, 2020 21:04
craig bot pushed a commit that referenced this pull request Jun 10, 2020
49814: sql: handle tuples with nulls for IN operator  r=RaduBerinde a=rafiss

A previous change had allowed any query of the form <left> IN <subquery>
to typecheck as long as <left> is NULL or a tuple containing any NULLS.

This erroneously allowed something like `('s', NULL) IN (1, 2)` to
typecheck. Now, this is fixed, by making sure all the non-null tuple
elements have the same type.

A release note is omitted as this fixes a bug that is only present in
non-published versions of CockroachDB.

See #49723 and #49767 (review)

Release note: None

50011: sql: timestamp should accept DB2 formatted timestamps r=otan a=Arun4rangan

fixes : #49768

This PR adds additional extracting field logics that
allow db2 formatted timesstamps to be parsed.

Release note (sql change): The pgdate util can now parse
db2 formatted timestamps. This can be used to import db2 dumps.

Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Arun Ranganathan <arun.ranga@hotmail.ca>
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: unsupported comparison operator: <unknown> IN <tuple{int}>
3 participants