Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/3640#discussion_r21512252
--- Diff:
sql/hive/v0.12.0/src/main/scala/org/apache/spark/sql/hive/Shim12.scala ---
@@ -49,6 +49,16 @@ import org.apache.spark.sql.catalyst.types.DecimalType
private[hive] object HiveShim {
val version = "0.12.0"
+ import org.apache.hadoop.hive.ql.exec.Utilities
+
+ def deserializePlan[UDFType](is: java.io.InputStream, clazz:
Class[UDFType]): UDFType = {
+ Utilities.deserializePlan(is).asInstanceOf[UDFType]
+ }
+
+ def serializePlan(function: Any, out: java.io.OutputStream): Unit = {
+ Utilities.serializePlan(function, out)
+ }
+
--- End diff --
Instead of calling `Utilities.deserializePlan`, how about mimic
`Utilities.de/serializeObjectByKryo` methods here? Those two functions are
private but very simple, the advantage is that we don't need the expensive
`HiveConf` instantiation here.
---
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]