nuno-faria commented on PR #17058: URL: https://github.com/apache/datafusion/pull/17058#issuecomment-3178913275
Fix pushed. It might also be worth thinking about pushing this fix to main, since currently the `SortExec` is also missing there for `string_agg`: ```sql > create table t (k varchar, v int); 0 row(s) fetched. Elapsed 0.005 seconds. > insert into t values ('a', 2), ('b', 3), ('c', 1); +-------+ | count | +-------+ | 3 | +-------+ 1 row(s) fetched. Elapsed 0.011 seconds. > explain select string_agg(k, ',' order by v) from t; +---------------+-------------------------------+ | plan_type | plan | +---------------+-------------------------------+ | physical_plan | ┌───────────────────────────┐ | | | │ AggregateExec │ | | | │ -------------------- │ | | | │ aggr: │ | | | │ string_agg(t.k, ,) ORDER │ | | | │ BY [t.v ASC NULLS LAST] │ | | | │ │ | | | │ mode: Single │ | | | └─────────────┬─────────────┘ | | | ┌─────────────┴─────────────┐ | | | │ DataSourceExec │ | | | │ -------------------- │ | | | │ bytes: 296 │ | | | │ format: memory │ | | | │ rows: 1 │ | | | └───────────────────────────┘ | | | | +---------------+-------------------------------+ 1 row(s) fetched. Elapsed 0.010 seconds. > explain select array_agg(k order by v) from t; +---------------+-------------------------------+ | plan_type | plan | +---------------+-------------------------------+ | physical_plan | ┌───────────────────────────┐ | | | │ AggregateExec │ | | | │ -------------------- │ | | | │ aggr │ | | | │ │ | | | │ mode: Single │ | | | └─────────────┬─────────────┘ | | | ┌─────────────┴─────────────┐ | | | │ SortExec │ | | | │ -------------------- │ | | | │ v@1 ASC NULLS LAST │ | | | └─────────────┬─────────────┘ | | | ┌─────────────┴─────────────┐ | | | │ DataSourceExec │ | | | │ -------------------- │ | | | │ bytes: 296 │ | | | │ format: memory │ | | | │ rows: 1 │ | | | └───────────────────────────┘ | | | | +---------------+-------------------------------+ ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org