-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The string_agg
function does not respect the ORDER BY
clause in the 49.0.0
release. It does work after e1a5cdf I believe (#16625).
I discovered this while attempting to upgrade datafusion-python
to datafusion 49.0.0
, which causes some tests to fail. Would it be possible to release a minor update to allow datafusion-python
to support datafusion 49
?
To Reproduce
On the released 49.0.0
version:
> create table t (k varchar, v int);
0 row(s) fetched.
Elapsed 0.055 seconds.
> insert into t values ('a', 2), ('b', 3), ('c', 1);
+-------+
| count |
+-------+
| 3 |
+-------+
1 row(s) fetched.
Elapsed 0.065 seconds.
> select string_agg(k, ',' order by v) from t;
+---------------------------------------------------------+
| string_agg(t.k,Utf8(",")) ORDER BY [t.v ASC NULLS LAST] |
+---------------------------------------------------------+
| a,b,c |
+---------------------------------------------------------+
1 row(s) fetched.
Expected behavior
Should return:
+---------------------------------------------------------+
| string_agg(t.k,Utf8(",")) ORDER BY [t.v ASC NULLS LAST] |
+---------------------------------------------------------+
| c,a,b |
+---------------------------------------------------------+
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working