Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/13704
> the `Cast` performs conversion from `UnsafeArrayData` to
`GenericArrayData`.
`Cast` is used to cast one type to another, not cast one kind of data
representation to another, so I don't quite understand why the `Cast` is there.
> This code generation always creates `Object[]` and assign values into
each `Object[]` element.
This is reasonable, as it needs to take care of null elements. And we do
have a chance to optimize it: if the target array type's element type is
primitive and the input array type's element nullability is false, we can avoid
using `Object[]`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]