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

OR to IN rewrite in functions could produce wrong results #2663

Merged
merged 4 commits into from
Jul 18, 2018

Conversation

chenxing-xc
Copy link
Contributor

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

select minus(col='a' or col = 'b' or col = 'c' or col='d', col='a') from table

While OR predicate is rewrite into IN expr, the Replaced Syntax tree will evaluate above function as minus(col ='a', IN-pred), and not correct.

@alexey-milovidov
Copy link
Member

Thank you!

Could you please also add a test (into dbms/tests/queries/0_stateless directory)?

@chenxing-xc
Copy link
Contributor Author

ok, simple test is added into 0_stateless directory

@alexey-milovidov alexey-milovidov merged commit f491bcc into ClickHouse:master Jul 18, 2018
alexey-milovidov pushed a commit that referenced this pull request Jul 18, 2018
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