brijrajk opened a new pull request, #56673:
URL: https://github.com/apache/spark/pull/56673

   ### What changes were proposed in this pull request?
   
   Update the `@ExpressionDescription` for `explode_outer` and 
`posexplode_outer` to explicitly state their behavior when the input array/map 
is null or empty, and add a null-input example to each.
   
   ### Why are the changes needed?
   
   The SQL function reference (generated from `@ExpressionDescription`) for 
`explode_outer` and `posexplode_outer` had identical `usage` text to their 
non-outer counterparts (`explode` / `posexplode`), omitting the defining 
difference: null or empty input produces a single null row rather than no rows. 
This information was already present in the PySpark docstrings but missing from 
the SQL reference.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No behavior change. Documentation only — the `DESCRIBE FUNCTION EXTENDED` 
output and generated SQL function reference now accurately describe the 
null/empty behavior.
   
   ### How was this patch tested?
   
   The catalyst module compiles cleanly. The example outputs were verified 
against the existing golden file 
`sql/core/src/test/resources/sql-tests/results/generators.sql.out`, which 
already tests `explode_outer(cast(null as array<int>))` and 
`posexplode_outer(cast(null as array<int>))` and confirms the expected `NULL` / 
`NULL\tNULL` output.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 4.6


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