buraksenn opened a new pull request, #21743:
URL: https://github.com/apache/datafusion/pull/21743

   ## Which issue does this PR close?
   Related with #2547 and #2548 but does not close 
   
   ## Rationale for this change
   In #21416 I've aligned ALL operator NULL semantics to Postgres while 
supporting additional operators. I've implemented ANY operator but missed that 
part. Initially that PR included these changes but with the suggestion from 
@Jefffrey I've separated those changes and opened this PR. 
   
   
   ## What changes are included in this PR?
   - Refactor ANY operator to use same logic with ALL operator 
   - align null semantics with postgres
   
     | Query | PostgreSQL | This PR | DuckDB |
     |---|---|---|---|
     | `5 = ANY(NULL::INT[])` | `NULL` | `NULL` | `false` |
     | `5 <> ANY(NULL::INT[])` | `NULL` | `NULL` | `false` |
     | `5 > ANY(NULL::INT[])` | `NULL` | `NULL` | `false` |
     | `5 < ANY(NULL::INT[])` | `NULL` | `NULL` | `false` |
     | `5 >= ANY(NULL::INT[])` | `NULL` | `NULL` | `false` |
     | `5 <= ANY(NULL::INT[])` | `NULL` | `NULL` | `false` |
   
   #### I'll explore a followup implementation on ANY and ALL as UDFs instead 
of this case approach to see if it will perform faster. I've wanted to open 
this PR to correct out the NULL behavior 
   
   ## Are these changes tested?
   Yes existing and additional slt tests. 
   
   ## Are there any user-facing changes?
   Yes users will be able to see null semantics are same as postgres
   


-- 
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