nat-openai opened a new issue, #26342:
URL: https://github.com/apache/datafusion/issues/26342

   ### Describe the bug
   
   The native `array_repeat` kernel in DataFusion can reject valid array inputs 
whose elements are nonnullable. It reconstructs the inner list with a nullable 
`item` field, while the outer list still expects the original type.
   
   ### To Reproduce
   
   Run this query with native execution, preserving `array(1)` as an Arrow list 
with a nonnullable `Int32` element field (`containsNull=false`):
   
   ```sql
   SELECT id, array_repeat(array(1), id) AS repeated
   FROM VALUES (1), (2) AS t(id);
   ```
   
   (Input paths that widen the element field to nullable can mask the bug, so 
this query does not fail on every Comet build.)
   
   Execution fails with an Arrow type mismatch:
   
   ```text
   ListArray expected data type List(non-null Int32) got List(Int32)
   ```
   
   ### Expected behavior
   
   In Spark, the query succeeds:
   
   ```text
   id  repeated
   1   [[1]]
   2   [[1], [1]]
   ```
   
   The native kernel should preserve the input list's element field, including 
nullability, name, and metadata, rather than replacing it with a new field.
   
   ### Additional context
   
   _No response_
   
   ### Willingness to contribute
   
   I would like to contribute a fix for this bug, but request guidance from the 
DataFusion community


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

Reply via email to