Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/4289#discussion_r24222165
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala ---
@@ -315,9 +335,17 @@ private[hive] object HadoopTableReader extends
HiveInspectors {
}
}
+ /**
+ * when the soi and deserializer.getObjectInspector is equal,
+ * we will get `IdentityConverter`,which mean it won't convert the
+ * value when schema match
+ */
+ val partTblObjectInspectorConverter =
ObjectInspectorConverters.getConverter(
+ deserializer.getObjectInspector, soi)
+
// Map each tuple to a row object
iterator.map { value =>
- val raw = deserializer.deserialize(value)
+ val raw =
partTblObjectInspectorConverter.convert(deserializer.deserialize(value))
--- End diff --
We can discuss that offline if you feel confusing.
---
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]