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

   ### Is your feature request related to a problem or challenge?
   
   ## Summary
   
   | Characteristic        | Description                                        
                                                                                
                                                                                
                                                                                
          |
   | --------------------- | 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 |
   | Function name:        | `array_distinct`                                   
                                                                                
                                                                                
                                                                                
          |
   | Aliases:              | `list_distinct`                                    
                                                                                
                                                                                
                                                                                
          |
   | Original function?:   | No                                                 
                                                                                
                                                                                
                                                                                
          |
   | Function Description: | <b>DuckDB:</b> Removes all duplicates and NULLs 
from a list. Does not preserve the original order. <br/> <b>Azure 
DataBricks:</b> Removes duplicate values from array. <br/> <b>SQL Spark:</b> 
Return distinct values from the array after removing duplicates.                
                              |
   | Sources:              | 
[Concept](https://github.com/apache/arrow-datafusion/discussions/6855) 
[DuckDB](https://duckdb.org/docs/sql/functions/nested) 
[Azure](https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/functions/array_distinct)
 [Spark](https://sparkbyexamples.com/spark/spark-sql-array-functions/) |
   
   ## Examples:
   
   ```
   D select array_distinct([1, 3, 2, 3, 1, 2, 4]);
   ┌──────────────────────────────────────────────────────┐
   │ array_distinct(main.list_value(1, 3, 2, 3, 1, 2, 4)) │
   │                       int32[]                        │
   ├──────────────────────────────────────────────────────┤
   │ [4, 2, 3, 1]                                         │
   └──────────────────────────────────────────────────────┘
   ```
   
   ```
   D select array_distinct(['a', 'b', 'c', 'd']);
   ┌─────────────────────────────────────────────────────┐
   │ array_distinct(main.list_value('a', 'b', 'c', 'd')) │
   │                      varchar[]                      │
   ├─────────────────────────────────────────────────────┤
   │ [b, d, c, a]                                        │
   └─────────────────────────────────────────────────────┘
   ```
   
   
   ### 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