Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/8971#discussion_r41426190
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/columnar/ColumnType.scala ---
@@ -399,24 +415,164 @@ private[sql] object BINARY extends
ByteArrayColumnType(16) {
override def getField(row: InternalRow, ordinal: Int): Array[Byte] = {
row.getBinary(ordinal)
}
+
+ def serialize(value: Array[Byte]): Array[Byte] = value
+ def deserialize(bytes: Array[Byte]): Array[Byte] = bytes
}
-// Used to process generic objects (all types other than those listed
above). Objects should be
-// serialized first before appending to the column `ByteBuffer`, and is
also extracted as serialized
-// byte array.
-private[sql] case class GENERIC(dataType: DataType) extends
ByteArrayColumnType(16) {
- override def setField(row: MutableRow, ordinal: Int, value:
Array[Byte]): Unit = {
- row.update(ordinal, SparkSqlSerializer.deserialize[Any](value))
+private[sql] case class DECIMAL(precision: Int, scale: Int)
--- End diff --
Maybe rename this one as `LARGE_DECIMAL` (in contrast to `COMPACT_DECIMAL`)
since this only handles decimals with precision >= 19.
---
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]