-
- Downloads
[SPARK-4152] [SQL] Avoid data change in CTAS while table already existed
CREATE TABLE t1 (a String); CREATE TABLE t1 AS SELECT key FROM src; – throw exception CREATE TABLE if not exists t1 AS SELECT key FROM src; – expect do nothing, currently it will overwrite the t1, which is incorrect. Author: Cheng Hao <hao.cheng@intel.com> Closes #3013 from chenghao-intel/ctas_unittest and squashes the following commits: 194113e [Cheng Hao] fix bug in CTAS when table already existed
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Catalog.scala 22 additions, 0 deletions...cala/org/apache/spark/sql/catalyst/analysis/Catalog.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala 6 additions, 0 deletions...cala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/CreateTableAsSelect.scala 11 additions, 1 deletion...apache/spark/sql/hive/execution/CreateTableAsSelect.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala 7 additions, 2 deletions...a/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
Please register or sign in to comment