Skip to content

Conversation

@Hydrocharged
Copy link
Contributor

Previously a statement such as UPDATE test SET col = 2 WHERE col = 1; would fail for ENUM and SET types. For the FILTER node, we only consider the values for comparison, but the aforementioned types can match 'horse' with the number 50, so we have to consider the column type.

Now this PR only affects ENUM and SET, although it's probably correct that all types should be used, with direct literal comparisons being used only when no other type can be derived from a column or variable. However, either MySQL has context-aware comparisons (my guess), or our comparison logic is wrong for other types, so I'm leaving those alone for now.

@Hydrocharged Hydrocharged requested a review from zachmu July 29, 2021 18:11
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LG, just a couple comments

@Hydrocharged Hydrocharged force-pushed the daylon/filter-col-type branch from bf3cd7f to 707d49a Compare July 29, 2021 20:24
@Hydrocharged Hydrocharged merged commit aca7418 into master Jul 29, 2021
@Hydrocharged Hydrocharged deleted the daylon/filter-col-type branch July 29, 2021 20:52
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