izveigor opened a new issue, #7194:
URL: https://github.com/apache/arrow-datafusion/issues/7194

   ### Is your feature request related to a problem or challenge?
   
   ## Summary
   
   | Characteristic        | Description                                        
                                                                                
                                                                                
            |
   | --------------------- | 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 |
   | Function name:        | `array_resize`                                     
                                                                                
                                                                                
            |
   | Aliases:              | `list_resize`                                      
                                                                                
                                                                                
            |
   | Original function?:   | No                                                 
                                                                                
                                                                                
            |
   | Function Description: | <b>ClickHouse:</b> Changes the length of the 
array. </br> <b>DuckDB:</b> Resizes the list to contain size elements. 
Initializes new elements with value or NULL if value is not set.                
                           |
   | Sources:              | 
[Concept](https://github.com/apache/arrow-datafusion/discussions/6855) 
[DuckDB](https://duckdb.org/docs/sql/functions/nested) 
[ClickHouse](https://clickhouse.com/docs/en/sql-reference/functions/array-functions#arrayresize)
 |
   
   ## Examples:
   
   ```
   SELECT arrayResize([1], 3)
   
   Query id: 2c975fce-0843-485f-9aef-1a8899728cdc
   
   ┌─arrayResize([1], 3)─┐
   │ [1,0,0]             │
   └─────────────────────┘
   ```
   
   ```
   SELECT arrayResize([[1, 2]], 2)
   
   Query id: 2765406e-c2dd-4208-bf5b-7fe42cd8b682
   
   ┌─arrayResize([[1, 2]], 2)─┐
   │ [[1,2],[]]               │
   └──────────────────────────┘
   ```
   
   ```
   SELECT arrayResize([1, 2], 4, 5)
   
   Query id: b75e55d1-1abb-4933-b2b1-f9d472308d91
   
   ┌─arrayResize([1, 2], 4, 5)─┐
   │ [1,2,5,5]                 │
   └───────────────────────────┘
   ```
   
   ```
   SELECT arrayResize([[1, 2], [3, 4]], 4, [1, 1])
   
   Query id: ebaeb0e6-b9e1-4a1f-986f-ff546eb37f9d
   
   ┌─arrayResize([[1, 2], [3, 4]], 4, [1, 1])─┐
   │ [[1,2],[3,4],[1,1],[1,1]]                │
   └──────────────────────────────────────────┘
   ```
   
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to