chenhao-db opened a new pull request, #47796:
URL: https://github.com/apache/spark/pull/47796

   ### What changes were proposed in this pull request?
   
   The `xpath` expression incorrectly marks its return type as array of 
non-null strings. However, it can actually return an array containing nulls. 
This can cause NPE in code generation, such as query `select 
coalesce(xpath(repeat('<a></a>', id), 'a')[0], '') from range(1, 2)`.
   
   ### Why are the changes needed?
   
   It avoids potential failures in queries that uses the `xpath` expression.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   A new unit test. It would fail without the change in the PR.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to