You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2026/08/06 05:28:51 UTC

[I] `array_sort` doesnt respect array inputs for sort order/nulls first [datafusion]

Jefffrey opened a new issue, #24132:
URL: https://github.com/apache/datafusion/issues/24132

   ### Describe the bug
   
   https://github.com/apache/datafusion/blob/f27e50c13647efa5292d5ef5b1e4ed6af3015962/datafusion/functions-nested/src/sort.rs#L163-L177
   
   If we pass in an array for the 2nd/3rd args, the code only takes the first value of the array.
   
   ### To Reproduce
   
   ```sql
   DataFusion CLI v54.1.0
   > select array_sort(a, b) from values ([2,1,3], 'desc'), ([2,1,3], 'asc') t(a,b);
   +---------------------+
   | array_sort(t.a,t.b) |
   +---------------------+
   | [3, 2, 1]           |
   | [3, 2, 1]           |
   +---------------------+
   2 row(s) fetched.
   Elapsed 0.073 seconds.
   ```
   
   ### Expected behavior
   
   Either they should respect the values per row, or should explicitly fail with error that it expects a constant/scalar input for those options
   
   ### 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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] `array_sort` doesnt respect array inputs for sort order/nulls first [datafusion]

Posted by "JSOD11 (via GitHub)" <gi...@apache.org>.
JSOD11 commented on issue #24132:
URL: https://github.com/apache/datafusion/issues/24132#issuecomment-5206795176

   take


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org