nuno-faria opened a new issue, #17011:
URL: https://github.com/apache/datafusion/issues/17011
### Describe the bug
The `string_agg` function does not respect the `ORDER BY` clause in the
`49.0.0` release. It does work after e1a5cdf6db791ea50b4028d6eb11ffafd940b29b 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:
```sql
> 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_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]