vincev commented on code in PR #7044:
URL: https://github.com/apache/arrow-datafusion/pull/7044#discussion_r1270759281


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1753,6 +1754,23 @@ pub enum Partitioning {
 }
 
 /// Unnest a column that contains a nested list type.
+///
+/// For example, calling unnest(c1) results in the following:

Review Comment:
   Yes when I implemented `unnest_column` I followed the logic in Pandas and 
Polars:
   
   ```
             ints  shape_id
   [3, 88, 94]         1
          [73]         2
          None         3
      [43, 97]         4
          None         5
          [65]         6
   ```
   
   by unnesting `ints` we get:
   
   ```
      ints  shape_id
      3         1
     88         1
     94         1
     73         2
   None         3
     43         4
     97         4
   None         5
     65         6
   ```
   
   that I think is better because you preserve all the information that was in 
the nested data and if then you want to nest the data again you get back the 
same data you started with.



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

Reply via email to