Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sql/expression: correctly evaluate conditions in CASE #788

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

erizocosmico
Copy link
Contributor

Fixes #787

@erizocosmico erizocosmico requested a review from a team July 9, 2019 08:33
@ajnavarro
Copy link
Contributor

Shall we review other similar cases to try to catch more places where this bug might be happening?

@erizocosmico
Copy link
Contributor Author

Done. No more usages of sql.Boolean.Convert in the wild

Copy link
Contributor

@kuba-- kuba-- left a comment

Choose a reason for hiding this comment

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

LGTM after tests pass, e.g.:

right operand in IN operation must be tuple, but is *expression.Literal

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico
Copy link
Contributor Author

Reverting, the sql.Boolean.Convert in an optimization rule was correct

@ajnavarro ajnavarro merged commit 764130c into src-d:master Jul 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on CASE statements when result is not bool
4 participants