You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/12 09:18:04 UTC
[GitHub] [spark] ulysses-you commented on a change in pull request #26831:
[SPARK-30201][SQL] HiveOutputWriter standardOI should use
ObjectInspectorCopyOption.DEFAULT
ulysses-you commented on a change in pull request #26831: [SPARK-30201][SQL] HiveOutputWriter standardOI should use ObjectInspectorCopyOption.DEFAULT
URL: https://github.com/apache/spark/pull/26831#discussion_r357033408
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveFileFormat.scala
##########
@@ -133,7 +133,7 @@ class HiveOutputWriter(
private val standardOI = ObjectInspectorUtils
.getStandardObjectInspector(
tableDesc.getDeserializer(jobConf).getObjectInspector,
- ObjectInspectorCopyOption.JAVA)
+ ObjectInspectorCopyOption.DEFAULT)
Review comment:
The code is at `HiveInspectors.wrapperFor()`.
```
case _: StringObjectInspector if x.preferWritable() =>
withNullSafe(o => getStringWritable(o))
case _: StringObjectInspector =>
withNullSafe(o => o.asInstanceOf[UTF8String].toString())
```
Before write data with hiveWriter, spark will use `HiveInspectors.wrapperFor()` to convert `UTF8String` to `Text` or `String`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org