[ 
https://issues.apache.org/jira/browse/SPARK-62412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151999#comment-18151999
 ] 

Ganesha S commented on SPARK-62412:
-----------------------------------

I'm working on the implementation and will raise a PR shortly.

> Add code generation support for UNNEST
> --------------------------------------
>
>                 Key: SPARK-62412
>                 URL: https://issues.apache.org/jira/browse/SPARK-62412
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Ganesha S
>            Priority: Major
>
> UNNEST is evaluated without code generation, which turns off whole-stage 
> codegen for that step of the query. explode supports code generation; in our 
> benchmark, explode is about 20-30% slower when code generation is turned off.
> Proposal: add code generation for UNNEST. One option is to translate UNNEST 
> into the existing generators (explode, posexplode, inline(arrays_zip(...))). 
> Any approach must keep UNNEST's current behavior:
> * a NULL array is treated as empty
> * with several arrays, shorter arrays are padded with NULLs
> * the WITH ORDINALITY column starts at 1, is BIGINT, and comes last
> * output column names (col, or col0, col1, ...) stay the same



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to