spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ABHISHEK KUMAR GUPTA (Jira)" <j...@apache.org>
Subject [jira] [Created] (SPARK-29584) NOT NULL is not supported in Spark
Date Thu, 24 Oct 2019 04:35:00 GMT
ABHISHEK KUMAR GUPTA created SPARK-29584:
--------------------------------------------

             Summary: NOT NULL is not supported in Spark
                 Key: SPARK-29584
                 URL: https://issues.apache.org/jira/browse/SPARK-29584
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: ABHISHEK KUMAR GUPTA


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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message