spark-instrumented-optimizer/sql/hive
Andrew Or a916d2a454 [SPARK-14119][SPARK-14120][SPARK-14122][SQL] Throw exception on unsupported DDL commands
## What changes were proposed in this pull request?

Before: We just pass all role commands to Hive even though it doesn't work.
After: We throw an `AnalysisException` that looks like this:

```
scala> sql("CREATE ROLE x")
org.apache.spark.sql.AnalysisException: Unsupported Hive operation: CREATE ROLE;
  at org.apache.spark.sql.hive.HiveQl$$anonfun$parsePlan$1.apply(HiveQl.scala:213)
  at org.apache.spark.sql.hive.HiveQl$$anonfun$parsePlan$1.apply(HiveQl.scala:208)
  at org.apache.spark.sql.catalyst.parser.CatalystQl.safeParse(CatalystQl.scala:49)
  at org.apache.spark.sql.hive.HiveQl.parsePlan(HiveQl.scala:208)
  at org.apache.spark.sql.SQLContext.parseSql(SQLContext.scala:198)
```

## How was this patch tested?

`HiveQuerySuite`

Author: Andrew Or <andrew@databricks.com>

Closes #11948 from andrewor14/ddl-role-management.
2016-03-28 16:45:31 -07:00
..
compatibility/src/test/scala/org/apache/spark/sql/hive/execution [SPARK-14119][SPARK-14120][SPARK-14122][SQL] Throw exception on unsupported DDL commands 2016-03-28 16:45:31 -07:00
src [SPARK-14119][SPARK-14120][SPARK-14122][SQL] Throw exception on unsupported DDL commands 2016-03-28 16:45:31 -07:00
pom.xml [SPARK-11624][SPARK-11972][SQL] fix commands that need hive to exec 2016-02-22 18:13:32 -08:00