Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/15044#discussion_r86659238
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala
---
@@ -158,6 +158,20 @@ object CatalystTypeConverters {
override def toCatalystImpl(scalaValue: Any): ArrayData = {
scalaValue match {
+ case a: Array[Boolean] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
+ case a: Array[Byte] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
+ case a: Array[Short] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
+ case a: Array[Int] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
+ case a: Array[Long] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
+ case a: Array[Float] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
+ case a: Array[Double] =>
+ UnsafeArrayData.fromPrimitiveArray(a)
--- End diff --
yea let's remove them, `CatalystTypeConverter` will not be in critical path
and we don't need to optimize it.
---
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]