jatin510 opened a new issue, #14228: URL: https://github.com/apache/datafusion/issues/14228
### Describe the bug In case of `array_repeat`, when the count variable is not of type `Int64`, it gives error. In case of `Int32`, `Int16`, `Int8`, we should automatically convert it into `Int64`. ### To Reproduce > select array_repeat(1 ,arrow_cast(2,'Int32')); Internal error: could not cast value to arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::Int64Type>. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker ### Expected behavior > select array_repeat(1,2); +---------------------------------+ | array_repeat(Int64(1),Int64(2)) | +---------------------------------+ | [1, 1] | +---------------------------------+ 1 row(s) fetched. ### Additional context I think, for `count` variable we should upcast to `Int64` if it is of type `Int8`, `Int16`, or `Int32`, preventing the error. -- 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.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