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

Pinot fails or returns incorrect results in case of IS NULL, IS NOT NULL predicates #9885

Closed
findepi opened this issue Nov 5, 2021 · 3 comments · Fixed by #16979
Closed
Labels
bug Something isn't working correctness

Comments

@findepi
Copy link
Member

findepi commented Nov 5, 2021

  1. the assumption at
    is incorrect, as this is exactly how Domain.notNull(type) is represented (i.e. result of x IS NOT NULL)
  2. the whole io.trino.plugin.pinot.query.PinotQueryBuilder#toPredicate method is incorrect, since it doesn't consult domain.isNullAllowed(), so x IS NULL OR x > 5 is going to return incorrect results
@findepi findepi added the bug Something isn't working label Nov 5, 2021
@findepi
Copy link
Member Author

findepi commented Nov 5, 2021

cc @elonazoulay @wendigo @hashhar

@findepi
Copy link
Member Author

findepi commented Mar 29, 2023

cc @elonazoulay

@elonazoulay
Copy link
Member

elonazoulay commented Mar 30, 2023

Note:
Pinot does not yet fully handle null values, ex.

select col from table where col is null

will return a non-null default value.

The is not null predicate should not be pushed down.

Will test, may have to disable pushdown of both IS NULL and IS NOT NULL since they will return incorrect results, updating and will push a pr.

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

Successfully merging a pull request may close this issue.

3 participants