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

feat(optimizer): ensure boolean predicates on CASE statement #2321

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

barakalon
Copy link
Collaborator

SELECT COALESCE(TRUE, 0) breaks trino:

trino error: line 1:23: All COALESCE operands must be the same type or coercible to a common type. Cannot find common type between boolean and integer, all types (without duplicates): [boolean, integer]

Conversely, mysql doesn't have a boolean type, so we see predicates like SELECT ... WHERE COALESCE(..., 0)

@tobymao tobymao merged commit f3d928b into main Sep 26, 2023
5 checks passed
@tobymao tobymao deleted the barak/coalesce-types branch September 26, 2023 06:33
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.

2 participants