Skip to content

fix string coercion missing in Eq/NotEq operator#2258

Merged
yjshen merged 2 commits intoapache:masterfrom
WinkerDu:master-utf8-coercion
Apr 18, 2022
Merged

fix string coercion missing in Eq/NotEq operator#2258
yjshen merged 2 commits intoapache:masterfrom
WinkerDu:master-utf8-coercion

Conversation

@WinkerDu
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2225.

Rationale for this change

Suppose large_string is a DataType::LargeUtf8 column in table t, sql like

select * from t where large_string = '1'

will throw an error: Plan("'LargeUtf8 = Utf8' can't be evaluated because there isn't a common type to coerce the types to")
This pr fix it.

What changes are included in this PR?

Introduce string_coercion to comparison_eq_coercion

Are there any user-facing changes?

No.

@WinkerDu WinkerDu changed the title fix issue that 'LargeUtf8 = Utf8' can't be evaluated in Eq operator fix string coercion missing in Eq/NotEq operator Apr 17, 2022
@WinkerDu
Copy link
Copy Markdown
Contributor Author

cc @alamb @xudong963 @liukun4515 @yjshen, please have a review, thank you.

Copy link
Copy Markdown
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@xudong963 xudong963 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 @WinkerDu

@yjshen yjshen merged commit 22b70b8 into apache:master Apr 18, 2022
Copy link
Copy Markdown
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.

👌 nice

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.

Comparison on LargeUtf8 doesn't work

5 participants