Skip to content

Conversation

@jonahgao
Copy link
Member

@jonahgao jonahgao commented Jul 25, 2023

Which issue does this PR close?

Partial fix for #7039.

Closes #7039

Rationale for this change

The following casts should be safe:

  • Utf8 -> Binary
  • Utf8 | LargetUtf8 | Binary -> LargeBinary

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added 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.

Thanks @jonahgao ❤️

I took the liberty of merging up from main to get a fix for CI failures and pushed a small sql level test in sqllogictests

Copy link
Member

@jackwener jackwener 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 @jonahgao

Comment on lines 776 to 782
(LargeBinary, LargeBinary)
| (Binary, LargeBinary)
| (LargeBinary, Binary)
| (Utf8, LargeBinary)
| (LargeBinary, Utf8)
| (LargeUtf8, LargeBinary)
| (LargeBinary, LargeUtf8) => Some(LargeBinary),
Copy link
Member

Choose a reason for hiding this comment

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

we can use

(LargeBinary, Utf8 | LargeUtf8 | Binary | LargeBinary) | (Utf8 | LargeUtf8 | Binary | LargeBinary, LargeBinary)

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. Thank you @jackwener ❤️

@jonahgao
Copy link
Member Author

Thanks @jonahgao ❤️

I took the liberty of merging up from main to get a fix for CI failures and pushed a small sql level test in sqllogictests

Thank you @alamb ❤️

@alamb alamb merged commit 52cf58b into apache:main Jul 25, 2023
@jonahgao jonahgao deleted the binary_type_coercion branch July 26, 2023 01:57
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.

Error with partitioned dataset: Cannot infer common argument type for comparison operation Binary != Utf8

3 participants