Details
-
Sub-task
-
Status: Closed
-
Blocker
-
Resolution: Won't Do
-
3.0.0
-
None
-
None
Description
We need to consider the behavior change of SPARK-30098 .
This is a placeholder to keep the discussion and the final decision.
`CREATE TABLE` syntax changes its behavior silently.
The following is one example of the breaking the existing user data pipelines.
Apache Spark 2.4.5
spark-sql> CREATE TABLE t(a STRING);
spark-sql> LOAD DATA INPATH '/usr/local/spark/README.md' INTO TABLE t;
spark-sql> SELECT * FROM t LIMIT 1;
# Apache Spark
Time taken: 2.05 seconds, Fetched 1 row(s)
spark-sql> CREATE TABLE t(a CHAR(3));
spark-sql> INSERT INTO TABLE t SELECT 'a ';
spark-sql> SELECT a, length(a) FROM t;
a 3
Apache Spark 3.0.0-preview2
spark-sql> CREATE TABLE t(a STRING); spark-sql> LOAD DATA INPATH '/usr/local/spark/README.md' INTO TABLE t; Error in query: LOAD DATA is not supported for datasource tables: `default`.`t`;
spark-sql> CREATE TABLE t(a CHAR(3));
spark-sql> INSERT INTO TABLE t SELECT 'a ';
spark-sql> SELECT a, length(a) FROM t;
a 2
Attachments
Issue Links
- is caused by
-
SPARK-30098 Add a configuration to use default datasource as provider for CREATE TABLE command
- Resolved
- is cloned by
-
SPARK-31707 Revert SPARK-30098 Use default datasource as provider for CREATE TABLE syntax
- Resolved
- relates to
-
SPARK-31147 forbid CHAR type in non-Hive-Serde tables
- Resolved
-
SPARK-31181 Remove the default value assumption on CREATE TABLE test cases
- Resolved
-
SPARK-31133 fix sql ref doc for DML
- Resolved
- links to