gortiz commented on issue #16821:
URL: https://github.com/apache/pinot/issues/16821#issuecomment-3307078798

   You are right, when `enableNullHandling` is false, the implementation of `IS 
NULL` and `IS NOT NULL` uses the null vector (as we should), we don't use the 
default value. I was misled by the fact that in that situation, queries like 
`col = value` use the default value and ignore the null vector (again, when 
`enableNullHandling` is set to false).
   
   But my point is still valid when the query uses `IS NULL` or `IS NOT NULL` 
and other predicates using thevalue.
   
   For example, using `NullHandlingQuickstart`, the following query
   
   ```
   select * 
   from clientSalaryNulls 
   where salary is null and salary = -2147483648
   limit 10
   ```
   
   Returns:
   
   | engine | null handling | returned pre #16658       | returned after #16658 
    |
   
|--------|--------------|---------------------------|---------------------------|
   | sse    | false        | rows where salary is null | rows where salary is 
null |
   | sse    | true         | empty                     | empty                  
   |
   | mse    | false        | empty                     | rows where salary is 
null |
   | mse    | true         | empty                     | empty                  
   |
   
   Another example that is even worse. The query:
   
   ```sql
   select *
   from clientSalaryNulls
   where salary IS NOT NULL 
   and salary <> 4398214
   and salary < 0
   ```
   
    Returns
   
   | engine | null handling | returned pre #16658 | returned after #16658     |
   |--------|--------------|---------------------|---------------------------|
   | sse    | false        | empty               | empty                     |
   | sse    | true         | empty               | empty                     |
   | mse    | false        | empty               | rows where salary is null |
   | mse    | true         | empty               | empty                     |
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to