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: disallow interval - timestamp #7086

Merged
merged 1 commit into from
Jul 25, 2023
Merged

fix: disallow interval - timestamp #7086

merged 1 commit into from
Jul 25, 2023

Conversation

jackwener
Copy link
Member

@jackwener jackwener commented Jul 25, 2023

Which issue does this PR close?

Closes #7085
Closes #7084.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

@jackwener jackwener marked this pull request as ready for review July 25, 2023 11:44
@github-actions github-actions bot added logical-expr Logical plan and expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jul 25, 2023
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @jackwener -- this looks perfect to me

cc @tustvold

(Date32, Interval(_)) => Some(lhs_type.clone()),
(Interval(_), Date64) => Some(rhs_type.clone()),
(Date64, Interval(_)) => Some(lhs_type.clone()),
(Timestamp(_, _) | Date32 | Date64, Interval(_)) => Some(lhs_type.clone()),
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't realize it was possible to do a match on a subfield of a tuple. TIL 🤯

Copy link
Contributor

@ozankabak ozankabak left a comment

Choose a reason for hiding this comment

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

LGTM as well, thank you!

@Dandandan Dandandan merged commit e7850d1 into apache:main Jul 25, 2023
@jackwener jackwener deleted the fix branch July 26, 2023 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interval - Timestamp should error, but succeeds
4 participants