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

Silent correctness issue for PSQL and SQLServer for LIKE predicate pushdown #18413

Open
vlad-lyutenko opened this issue Jul 25, 2023 · 0 comments
Labels
bug Something isn't working correctness

Comments

@vlad-lyutenko
Copy link
Contributor

vlad-lyutenko commented Jul 25, 2023

We have test for LIKE pushdown TestPostgreSqlConnectorTest.testLikePredicatePushdown()

Looks like it passing only because we have case sensitive columns in our test by default.
If we change collation for columns - it will fails.

I think we need to enable this pushdown only if column is case sensitive or we use enable_string_pushdown_with_collate.
The same problem with SQLServer.

So for example if table is case insensitive and we execute select, we could get different result with and without push down.

data : ABC, Abc, AbC, abc.

SELECT * WHERE column LIKE %abc% - with pushdown - ABC, Abc, AbC, abc.
                                    without pushdown - abc  

Here is attempt to apply this logic for MySql #18441

@vlad-lyutenko vlad-lyutenko changed the title Enable LIKE predicate pushdown only for case sensitive columns ( or with direct C collate) Enable LIKE predicate pushdown only for case sensitive columns or with direct C collate (Postgres, SQLServer) Jul 25, 2023
@vlad-lyutenko vlad-lyutenko changed the title Enable LIKE predicate pushdown only for case sensitive columns or with direct C collate (Postgres, SQLServer) Silent correctness issue for PSQL and SQLServer for LIKE predicate pushdown Jul 31, 2023
@hashhar hashhar added bug Something isn't working correctness labels Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctness
Development

No branches or pull requests

2 participants