izveigor opened a new issue, #6995: URL: https://github.com/apache/arrow-datafusion/issues/6995
### Is your feature request related to a problem or challenge? ## Summary | Characteristic | Description | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Function name: | `flatten` | | Aliases: | - | | Original function?: | No | | Function Description: | <b>Azure DataBricks:</b> Returns an array of the elements in the union of array1 and array2 without duplicates. </br> <b>Spark SQL:</b> Creates a single array from an array of arrays column. </br> <b>ClickHouse:</b> Converts an array of arrays to a flat array. Function: Applies to any depth of nested arrays. Does not change arrays that are already flat. The flattened array contains all the elements from all source arrays. </br> <b>DuckDB:</b> Concatenate a list of lists into a single list. This only flattens one level of the list (see examples). | | Sources: | [Concept](https://github.com/apache/arrow-datafusion/discussions/6855) [Azure](https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/functions/flatten) [DuckDB](https://duckdb.org/docs/sql/functions/nested) [ClickHouse](https://clickhouse.com/docs/en/sql-reference/functions/array-functions#arrayflatten) [Spark](https://sparkbyexamples.com/spark/spark-sql-array-functions/) | ## Examples: ``` D select flatten([[1, 2, 3], [4, 5, 6]]); ┌──────────────────────────────────────────────────────────────────────────────┐ │ flatten(main.list_value(main.list_value(1, 2, 3), main.list_value(4, 5, 6))) │ │ int32[] │ ├──────────────────────────────────────────────────────────────────────────────┤ │ [1, 2, 3, 4, 5, 6] │ └──────────────────────────────────────────────────────────────────────────────┘ D select flatten([[[1, 1], [2, 2], [3, 3]], [[4, 4], [5, 5], [6, 6]]]); ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ flatten(main.list_value(main.list_value(main.list_value(1, 1), main.list_value(2, 2), main.list_value(3, 3)), main.list_value(main.list_value(4, 4), main.li… │ │ int32[][] │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]] │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ``` ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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: github-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org