aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-05-12 18:40:30 -0700
committerReynold Xin <rxin@apache.org>2014-05-12 18:40:38 -0700
commit24cc933c893b634a2742e461385fd4ad01bb35e1 (patch)
tree5be2d452bd9582270d0b5cbbf591d9807e96e66a /sql/hive
parent59695b367ceb99643eb88bb0b4b0442211697561 (diff)
downloadspark-24cc933c893b634a2742e461385fd4ad01bb35e1.tar.gz
spark-24cc933c893b634a2742e461385fd4ad01bb35e1.tar.bz2
spark-24cc933c893b634a2742e461385fd4ad01bb35e1.zip
[SQL] Make Hive Metastore conversion functions publicly visible.
I need this to be public for the implementation of SharkServer2. However, I think this functionality is generally useful and should be pretty stable. Author: Michael Armbrust <michael@databricks.com> Closes #750 from marmbrus/metastoreTypes and squashes the following commits: f51b62e [Michael Armbrust] Make Hive Metastore conversion functions publicly visible. (cherry picked from commit 2f1a3373583f9b34a121236c25f5142ba8729546) Signed-off-by: Reynold Xin <rxin@apache.org>
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
index ba837a274c..fa30f596f8 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
@@ -26,6 +26,7 @@ import org.apache.hadoop.hive.ql.plan.TableDesc
import org.apache.hadoop.hive.ql.session.SessionState
import org.apache.hadoop.hive.serde2.Deserializer
+import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.sql.Logging
import org.apache.spark.sql.catalyst.analysis.{EliminateAnalysisOperators, Catalog}
import org.apache.spark.sql.catalyst.expressions._
@@ -172,7 +173,12 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
override def unregisterAllTables() = {}
}
-private[hive] object HiveMetastoreTypes extends RegexParsers {
+/**
+ * :: DeveloperApi ::
+ * Provides conversions between Spark SQL data types and Hive Metastore types.
+ */
+@DeveloperApi
+object HiveMetastoreTypes extends RegexParsers {
protected lazy val primitiveType: Parser[DataType] =
"string" ^^^ StringType |
"float" ^^^ FloatType |