From 8b697be520bb9c070462bebc8c72796eca8c8517 Mon Sep 17 00:00:00 2001 From: Wenchen Fan Date: Wed, 30 Nov 2016 15:04:47 +0800 Subject: [PATCH] address comments --- .../main/scala/org/apache/spark/sql/hive/HiveUtils.scala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala index fa2f34f8fd358..26b1994308f5d 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala @@ -51,10 +51,15 @@ private[spark] object HiveUtils extends Logging { sc } - // The version of hive used internally by Spark SQL. + /** The version of hive used internally by Spark SQL. */ val hiveExecutionVersion: String = "1.2.1" - // The property key that is used to store the raw hive type string in the metadata of StructField. + /** + * The property key that is used to store the raw hive type string in the metadata of StructField. + * For example, in the case where the Hive type is varchar, the type gets mapped to a string type + * in Spark SQL, but we need to preserve the original type in order to invoke the correct object + * inspector in Hive. + */ val hiveTypeString: String = "HIVE_TYPE_STRING" val HIVE_METASTORE_VERSION = SQLConfigBuilder("spark.sql.hive.metastore.version")