diff options
author | Michael Armbrust <michael@databricks.com> | 2014-05-12 18:40:30 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-05-12 18:40:30 -0700 |
commit | 2f1a3373583f9b34a121236c25f5142ba8729546 (patch) | |
tree | 319c7980001444c69405907cdd77dcf610364574 /sql/hive/src/main | |
parent | 3e13b8c0bd46894392bd0fbd3e86dd55b8103858 (diff) | |
download | spark-2f1a3373583f9b34a121236c25f5142ba8729546.tar.gz spark-2f1a3373583f9b34a121236c25f5142ba8729546.tar.bz2 spark-2f1a3373583f9b34a121236c25f5142ba8729546.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.
Diffstat (limited to 'sql/hive/src/main')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala | 8 |
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 | |