izveigor commented on code in PR #7207: URL: https://github.com/apache/arrow-datafusion/pull/7207#discussion_r1285067202
########## datafusion/physical-expr/src/array_expressions.rs: ########## @@ -238,18 +244,18 @@ fn compute_array_dims(arr: Option<ArrayRef>) -> Result<Option<Vec<Option<u64>>>> /// /// Calling `array(col1, col2)` where col1 and col2 are lists /// would return a single new `ListArray`, where each row was a list -/// of the corresponding elements of col1 and col2 flattened. +/// of the corresponding elements of col1 and col2. /// /// ``` text -/// ┌──────────────┐ ┌──────────────┐ ┌────────────────────────┐ -/// │ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌────────────────────┐ │ -/// │ │ [A, X] │ │ │ │ [] │ │ │ │ [A, X] │ │ -/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────┤ │ -/// │ │[NULL, Y] │ │ │ │[Q, R, S] │ │───────▶│ │ [NULL, Y, Q, R, S] │ │ -/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────┤ │ -/// │ │ [C, Z] │ │ │ │ NULL │ │ │ │ [C, Z, NULL] │ │ -/// │ └──────────┘ │ │ └──────────┘ │ │ └────────────────────┘ │ -/// └──────────────┘ └──────────────┘ └────────────────────────┘ +/// ┌──────────────┐ ┌──────────────┐ ┌─────────────────────────────┐ +/// │ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌────────────────────────┐ │ +/// │ │ [A, X] │ │ │ │ [] │ │ │ │ [[A, X], []] │ │ +/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────────┤ │ +/// │ │[NULL, Y] │ │ │ │[Q, R, S] │ │───────▶│ │ [[NULL, Y], [Q, R, S]] │ │ +/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────────│ │ +/// │ │ [C, Z] │ │ │ │ NULL │ │ │ │ [[C, Z], NULL] │ │ +/// │ └──────────┘ │ │ └──────────┘ │ │ └────────────────────────┘ │ +/// └──────────────┘ └──────────────┘ └─────────────────────────────┘ Review Comment: 👍 ########## datafusion/physical-expr/src/array_expressions.rs: ########## @@ -238,18 +244,18 @@ fn compute_array_dims(arr: Option<ArrayRef>) -> Result<Option<Vec<Option<u64>>>> /// /// Calling `array(col1, col2)` where col1 and col2 are lists /// would return a single new `ListArray`, where each row was a list -/// of the corresponding elements of col1 and col2 flattened. +/// of the corresponding elements of col1 and col2. /// /// ``` text -/// ┌──────────────┐ ┌──────────────┐ ┌────────────────────────┐ -/// │ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌────────────────────┐ │ -/// │ │ [A, X] │ │ │ │ [] │ │ │ │ [A, X] │ │ -/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────┤ │ -/// │ │[NULL, Y] │ │ │ │[Q, R, S] │ │───────▶│ │ [NULL, Y, Q, R, S] │ │ -/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────┤ │ -/// │ │ [C, Z] │ │ │ │ NULL │ │ │ │ [C, Z, NULL] │ │ -/// │ └──────────┘ │ │ └──────────┘ │ │ └────────────────────┘ │ -/// └──────────────┘ └──────────────┘ └────────────────────────┘ +/// ┌──────────────┐ ┌──────────────┐ ┌─────────────────────────────┐ +/// │ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌────────────────────────┐ │ +/// │ │ [A, X] │ │ │ │ [] │ │ │ │ [[A, X], []] │ │ +/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────────┤ │ +/// │ │[NULL, Y] │ │ │ │[Q, R, S] │ │───────▶│ │ [[NULL, Y], [Q, R, S]] │ │ +/// │ ├──────────┤ │ │ ├──────────┤ │ │ ├────────────────────────│ │ +/// │ │ [C, Z] │ │ │ │ NULL │ │ │ │ [[C, Z], NULL] │ │ +/// │ └──────────┘ │ │ └──────────┘ │ │ └────────────────────────┘ │ +/// └──────────────┘ └──────────────┘ └─────────────────────────────┘ Review Comment: 👍 -- 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]
