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: type coercion support date - date #6578

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Conversation

jackwener
Copy link
Member

@jackwener jackwener commented Jun 7, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

type coercion support date - date

Are these changes tested?

need arrow-rs support it, and then we add slt to test it.

Are there any user-facing changes?

@jackwener jackwener changed the title feat: type coercion support date - date fix: type coercion support date - date Jun 7, 2023
@github-actions github-actions bot added the logical-expr Logical plan and expressions label Jun 7, 2023
@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Jun 7, 2023
@jackwener
Copy link
Member Author

jackwener commented Jun 7, 2023

wait for arrow-rs support date - date
wait for update arrow-rs new-version

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.

LGTM -- thanks @jackwener

datafusion/expr/src/type_coercion/binary.rs Outdated Show resolved Hide resolved
@jackwener
Copy link
Member Author

Thanks @alamb review

@jackwener jackwener merged commit 9c13a77 into apache:main Jun 8, 2023
@jackwener jackwener deleted the date_minus branch June 8, 2023 03:31
@@ -733,10 +735,13 @@ fn is_time_with_valid_unit(datatype: DataType) -> bool {
fn temporal_coercion(lhs_type: &DataType, rhs_type: &DataType) -> Option<DataType> {
use arrow::datatypes::DataType::*;
use arrow::datatypes::IntervalUnit::*;
use arrow::datatypes::TimeUnit::*;

if lhs_type == rhs_type {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

jayzhan211 pushed a commit to jayzhan211/datafusion that referenced this pull request Jun 12, 2023
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.

2 participants