You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jatin510 (via GitHub)" <gi...@apache.org> on 2025/01/22 08:46:38 UTC
[I] Array repeat, upcast issue [datafusion]
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-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 repeat, upcast issue [datafusion]
Posted by "korowa (via GitHub)" <gi...@apache.org>.
korowa closed issue #14228: Array repeat, upcast issue
URL: https://github.com/apache/datafusion/issues/14228
--
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