WinkerDu opened a new pull request, #2627:
URL: https://github.com/apache/arrow-datafusion/pull/2627

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #2626 .
   
    # Rationale for this change
   `like`, `not like` expressions doesn't work well with literal `NULL` in DF.
   
   **To Reproduce**
   ```
   > SELECT column1 like NULL from (values('a'), ('b'), (NULL)) as t
   Plan("'Utf8 LIKE Null' can't be evaluated because there isn't a common type 
to coerce the types to")
   ```
   Postgres works like
   ```
   # SELECT column1 like NULL from (values('a'), ('b'), (NULL)) as t;
    ?column? 
   ----------
    
    
    
   (3 rows)
   ```
   
   # What changes are included in this PR?
   - Introduces `null_coercion` to `like_coercion`
   - Enhances `compute_utf8_op_scalar` to produce null array when  scalar value 
`NULL` inputs.
   
   # Are there any user-facing changes?
   No.
   
   # Does this PR break compatibility with Ballista?
   No.


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

Reply via email to