vincev commented on PR #6796: URL: https://github.com/apache/arrow-datafusion/pull/6796#issuecomment-1656762357
I had quick look through the code to see if we can apply `unnest_column`, if I understand correctly we create a `LogicalPlan` for each array column then apply a row number window function to each plan and then join all these plans with a `Full` join. I guess this makes sense when we create arrays in the select expression like: ``` select unnest(make_array(1,2,3,4,5)), unnest(make_array(6,7)); ``` `unnest_column` is useful when we work on a full table that contains a arrays and non arrays like: ``` ┌──────────────┬───────┐ │ l │ m │ │ int32[] │ int32 │ ├──────────────┼───────┤ │ [11] │ 1 │ │ [21, 22] │ 2 │ │ [31, 32, 33] │ 3 │ │ [41, 42] │ 4 │ │ [51] │ 5 │ └──────────────┴───────┘ ``` Then a statement like: ``` select unnest(l), m from table; ``` should call `unnest_column` on column `l` that will take take care of unnesting and null handling (see https://github.com/apache/arrow-datafusion/pull/7088). -- 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]
