diff options
author | huangzhaowei <carlmartinmax@gmail.com> | 2015-11-02 21:31:10 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2015-11-02 21:31:10 +0800 |
commit | 767522dc4e66dd26773d41d1576945187180d2b9 (patch) | |
tree | 185ad15d7ee7c35df7d06b8532fda5c62c112ec5 /yarn/src | |
parent | ea4a3e7d06dd4a0f669460513b27469c468214fb (diff) | |
download | spark-767522dc4e66dd26773d41d1576945187180d2b9.tar.gz spark-767522dc4e66dd26773d41d1576945187180d2b9.tar.bz2 spark-767522dc4e66dd26773d41d1576945187180d2b9.zip |
[SPARK-10786][SQL] Take the whole statement to generate the CommandProcessor
In the now implementation of `SparkSQLCLIDriver.scala`:
`val proc: CommandProcessor = CommandProcessorFactory.get(Array(tokens(0)), hconf)`
`CommandProcessorFactory` only take the first token of the statement, and this will be hard to diff the statement `delete jar xxx` and `delete from xxx`.
So maybe it's better to take the whole statement into the `CommandProcessorFactory`.
And in [HiveCommand](https://github.com/SaintBacchus/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/processors/HiveCommand.java#L76), it already special handing these two statement.
```java
if(command.length > 1 && "from".equalsIgnoreCase(command[1])) {
//special handling for SQL "delete from <table> where..."
return null;
}
```
Author: huangzhaowei <carlmartinmax@gmail.com>
Closes #8895 from SaintBacchus/SPARK-10786.
Diffstat (limited to 'yarn/src')
0 files changed, 0 insertions, 0 deletions