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

   ## Which issue does this PR close?
   
   - Closes #24152
   
   ## Rationale for this change
   
   `regexp_count` and `regexp_instr` should follow the behavior of these 
functions in PostgreSQL and return NULL when any of their arguments is NULL. 
The previous behavior was inconsistent: `regexp_instr` returned NULL for a NULL 
string or pattern, but otherwise NULLs were treated as a default value, 
returned a match count of 0, or raised an error, depending on the context.
   
   ## What changes are included in this PR?
   
   * Make NULL handling of `regexp_count` and `regexp_instr` consistent and 
match PostgreSQL
   * Update SLTs or add new SLTs / unit tests as necessary
   
   ## Are these changes tested?
   
   Yes, new tests added and/or existing tests updated when necessary.
   
   ## Are there any user-facing changes?
   
   Yes: the behavior of these UDFs has changed when called with NULL arguments.
   


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