Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
3.0.0
-
None
-
None
Description
Spark while creating table restricting column for NULL value is not supported.
As below
PostgreSQL: SUCCESS No Exception
CREATE TABLE Persons (ID int NOT NULL, LastName varchar(255) NOT NULL,FirstName varchar(255) NOT NULL, Age int);
insert into Persons values(1,'GUPTA','Abhi',NULL);
select * from persons;
Spark: Parse Exception
jdbc:hive2://10.18.19.208:23040/default> CREATE TABLE Persons (ID int NOT NULL, LastName varchar(255) NOT NULL,FirstName varchar(255) NOT NULL, Age int);
Error: org.apache.spark.sql.catalyst.parser.ParseException:
no viable alternative at input 'CREATE TABLE Persons (ID int NOT'(line 1, pos 29)
Parse Exception
Attachments
Issue Links
- is duplicated by
-
SPARK-19842 Informational Referential Integrity Constraints Support in Spark
- Open