-
- Downloads
[SPARK-13139][SQL] Parse Hive DDL commands ourselves
## What changes were proposed in this pull request? This patch is ported over from viirya's changes in #11048. Currently for most DDLs we just pass the query text directly to Hive. Instead, we should parse these commands ourselves and in the future (not part of this patch) use the `HiveCatalog` to process these DDLs. This is a pretext to merging `SQLContext` and `HiveContext`. Note: As of this patch we still pass the query text to Hive. The difference is that we now parse the commands ourselves so in the future we can just use our own catalog. ## How was this patch tested? Jenkins, new `DDLCommandSuite`, which comprises of about 40% of the changes here. Author: Andrew Or <andrew@databricks.com> Closes #11573 from andrewor14/parser-plus-plus.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala 10 additions, 1 deletion...la/org/apache/spark/sql/catalyst/parser/ParserUtils.scala
- sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala 9 additions, 0 deletions...core/src/main/scala/org/apache/spark/sql/SQLContext.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala 106 additions, 19 deletions...c/main/scala/org/apache/spark/sql/execution/SparkQl.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/AlterTableCommandParser.scala 428 additions, 0 deletions...spark/sql/execution/command/AlterTableCommandParser.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala 210 additions, 0 deletions...in/scala/org/apache/spark/sql/execution/command/ddl.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala 544 additions, 0 deletions.../apache/spark/sql/execution/command/DDLCommandSuite.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala 9 additions, 0 deletions...rc/main/scala/org/apache/spark/sql/hive/HiveContext.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala 2 additions, 16 deletions...ive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
Loading
Please register or sign in to comment