You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "timsaucer (via GitHub)" <gi...@apache.org> on 2026/01/23 00:58:03 UTC

[I] Regression: `array_sort` fails on list with inner non-nullable field [datafusion]

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

   ### Describe the bug
   
   When you have a ListArray and the inner field is non-nullable, `array_sort` generates an error in 51.0.0. See below for steps to reproduce.
   
   ### To Reproduce
   
   The following generates an error:
   
   ```sql
   select array_sort(arrow_cast(make_array(1, 3, 5, -5), 'List(non-null Int32)'));
   ```
   
   > DataFusion error: Internal("Assertion failed: result_data_type == *expected_type: Function 'array_sort' returned value of type 'List(Field { data_type: Int32 })' while the following type was promised at planning time and expected: 'List(Field { data_type: Int32, nullable: true })'")
   
   ### Expected behavior
   
   You cannot do the above sql with 50.0.0 but I did test by manually creating and registering a record batch that has a list array with inner non-nullable field. It passes in 50.0.0 and fails in 51.0.0.
   
   ### Additional context
   
   I believe this was introduced in https://github.com/apache/datafusion/pull/17657


-- 
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] Regression: `array_sort` fails on list with inner non-nullable field [datafusion]

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

   Whoops! Thanks for spotting this, should be a quick fix 👍 


-- 
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


Re: [I] Regression: `array_sort` fails on list with inner non-nullable field [datafusion]

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

   FYI @Jefffrey 


-- 
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


Re: [I] Regression: `array_sort` fails on list with inner non-nullable field [datafusion]

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

   I am scoping out bugs / regressions to backport to `branch-52` if we make another patchset release
   
   Would this be a good candidate?


-- 
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


Re: [I] Regression: `array_sort` fails on list with inner non-nullable field [datafusion]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead closed issue #19947: Regression: `array_sort` fails on list with inner non-nullable field
URL: https://github.com/apache/datafusion/issues/19947


-- 
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