Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/10399#discussion_r57001947
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/RowEncoder.scala
---
@@ -142,7 +142,9 @@ object RowEncoder {
case CalendarIntervalType => dt
case TimestampType => ObjectType(classOf[java.sql.Timestamp])
case DateType => ObjectType(classOf[java.sql.Date])
- case _: DecimalType => ObjectType(classOf[java.math.BigDecimal])
+ // In order to support both Decimal and java BigDecimal in external
row, we make this
+ // as java.lang.Object.
+ case _: DecimalType => ObjectType(classOf[java.lang.Object])
--- End diff --
`externalDataTypeFor` is also used in `constructorFor`, I think we should
create a `externalDataTypeForInput` that can handle decimal type specially and
use it in `extractorFor`.
---
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]