jayzhan211 commented on issue #6980: URL: https://github.com/apache/arrow-datafusion/issues/6980#issuecomment-1667976685
> > I would like to try on `array_aggregate`. https://duckdb.org/docs/sql/functions/nested#list-aggregates There are many kinds of rewrite functions, but most of them are not supported yet. I think we can start with the easy one or an existing function, like `sum`, `min`, or `max`. > > It sounds great! Thank you, @jayzhan211! I created the tickets about this topic: #7213 and #7214. > > > @izveigor , I dont fully understand about the difference between `list_xxx` and `array_xxx` in duckdb. As you said, list is for mutable, and array is for immutable. But like `append` a mutable function, why do they have `array_append`? `contains` a immutable function, but they have `list_contains`. For aggregate rewrite functions like `list_min`, `list_sum`, they don't alias with array, no `array_min` or `array_sum`, but we can do the same things with `array_aggregate()`. > > How do we differentiate `list`, and `array` in datafusion? > > I don't fully understand DuckDB principles myself. In my opinion every function should have `list_` and `array_` prefix due to the habit of using a single word. About mutability, this is purely my assumption of separation of functions, we may not adhere to it. I asked someone that is familiar with duckdb, he says the reason that they have list_xxx and array_xxx is due to compatibility, postgres for array_xxx, and others for list_xxx. In this case, since we heavily adopted from duckdb, clickhouse and others, we should also use similar naming from them, but I don't think mutability is the thing that differentiates list_xxx and array_xxx, it might be misleading if we said that. -- 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]
