diff options
author | xin Wu <xinwu@us.ibm.com> | 2016-05-11 22:17:59 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2016-05-11 22:17:59 +0800 |
commit | 427c20dd6d84cb9de1aac322183bc6e7b72ca25d (patch) | |
tree | 476278b64b487ac1d6ca375e88a58b82ae42ac7b /examples/src/main | |
parent | d88afabdfa83be47f36d833105aadd6b818ceeee (diff) | |
download | spark-427c20dd6d84cb9de1aac322183bc6e7b72ca25d.tar.gz spark-427c20dd6d84cb9de1aac322183bc6e7b72ca25d.tar.bz2 spark-427c20dd6d84cb9de1aac322183bc6e7b72ca25d.zip |
[SPARK-14933][SQL] Failed to create view out of a parquet or orc table
## What changes were proposed in this pull request?
#### Symptom
If a table is created as parquet or ORC table with hive syntaxt DDL, such as
```SQL
create table t1 (c1 int, c2 string) stored as parquet
```
The following command will fail
```SQL
create view v1 as select * from t1
```
#### Root Cause
Currently, `HiveMetaStoreCatalog` converts Paruqet/Orc tables to `LogicalRelation` without giving any `tableIdentifier`. `SQLBuilder` expects the `LogicalRelation` to have an associated `tableIdentifier`. However, the `LogicalRelation` created earlier does not have such a `tableIdentifier`. Thus, `SQLBuilder.toSQL` can not recognize this logical plan and issue an exception.
This PR is to assign a `TableIdentifier` to the `LogicalRelation` when resolving parquet or orc tables in `HiveMetaStoreCatalog`.
## How was this patch tested?
testcases created and dev/run-tests is run.
Author: xin Wu <xinwu@us.ibm.com>
Closes #12716 from xwu0226/SPARK_14933.
Diffstat (limited to 'examples/src/main')
0 files changed, 0 insertions, 0 deletions