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

support unsigned numeric data type in UnwrapCastInBinaryComparison rule #3702

Closed
liukun4515 opened this issue Oct 4, 2022 · 4 comments · Fixed by #4149
Closed

support unsigned numeric data type in UnwrapCastInBinaryComparison rule #3702

liukun4515 opened this issue Oct 4, 2022 · 4 comments · Fixed by #4149
Assignees

Comments

@liukun4515
Copy link
Contributor

    This plan doesn't look ideal to me -- since `col_int32` is int32 I think the exprs could be rewritten to 
CASE WHEN #test.col_int32 > Int32(0) THEN Int32(1) ELSE Int32(0) END

Could be done as a follow on PR for sure

Originally posted by @alamb in #3699 (comment)

@alamb
Copy link
Contributor

alamb commented Oct 4, 2022

To implement this, as @liukun4515 notes, the UnwrapCastInBinaryComparison code just needs to be extended to support unsigned types as well

@alamb
Copy link
Contributor

alamb commented Nov 8, 2022

I am working on this feature as we need it for IOx

@liukun4515
Copy link
Contributor Author

am working on this feature as we need

look forward your pr

@alamb
Copy link
Contributor

alamb commented Nov 12, 2022

PR is now ready for review #4149

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 a pull request may close this issue.

2 participants