diff options
author | Andrew Or <andrew@databricks.com> | 2016-03-07 18:01:27 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-03-07 18:01:27 -0800 |
commit | da7bfac488b2a25c591986fe5f906b5c98dc34ea (patch) | |
tree | a6617985fd727cd7e598cc65d11514f549102648 /sql/hive | |
parent | 46f25c241385fe4f1fff42ac4a1b6e652deb2d02 (diff) | |
download | spark-da7bfac488b2a25c591986fe5f906b5c98dc34ea.tar.gz spark-da7bfac488b2a25c591986fe5f906b5c98dc34ea.tar.bz2 spark-da7bfac488b2a25c591986fe5f906b5c98dc34ea.zip |
[SPARK-13689][SQL] Move helper things in CatalystQl to new utils object
## What changes were proposed in this pull request?
When we add more DDL parsing logic in the future, SparkQl will become very big. To keep it smaller, we'll introduce helper "parser objects", e.g. one to parse alter table commands. However, these parser objects will need to access some helper methods that exist in CatalystQl. The proposal is to move those methods to an isolated ParserUtils object.
This is based on viirya's changes in #11048. It prefaces the bigger fix for SPARK-13139 to make the diff of that patch smaller.
## How was this patch tested?
No change in functionality, so just Jenkins.
Author: Andrew Or <andrew@databricks.com>
Closes #11529 from andrewor14/parser-utils.
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala index 812e1fe51a..0bdebdc5fd 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala @@ -35,7 +35,6 @@ import org.apache.spark.sql.catalyst.TableIdentifier import org.apache.spark.sql.catalyst.catalog._ import org.apache.spark.sql.catalyst.expressions._ import org.apache.spark.sql.catalyst.parser._ -import org.apache.spark.sql.catalyst.parser.ParseUtils._ import org.apache.spark.sql.catalyst.plans._ import org.apache.spark.sql.catalyst.plans.logical._ import org.apache.spark.sql.execution.SparkQl @@ -81,6 +80,9 @@ private[hive] case class CreateViewAsSelect( /** Provides a mapping from HiveQL statements to catalyst logical plans and expression trees. */ private[hive] class HiveQl(conf: ParserConf) extends SparkQl(conf) with Logging { + import ParseUtils._ + import ParserUtils._ + protected val nativeCommands = Seq( "TOK_ALTERDATABASE_OWNER", "TOK_ALTERDATABASE_PROPERTIES", |