You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Serge Rielau (Jira)" <ji...@apache.org> on 2022/11/10 22:14:00 UTC
[jira] [Created] (SPARK-41104) Can insert NULL into hive table table with NOT NULL column
Serge Rielau created SPARK-41104:
------------------------------------
Summary: Can insert NULL into hive table table with NOT NULL column
Key: SPARK-41104
URL: https://issues.apache.org/jira/browse/SPARK-41104
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 3.4.0
Reporter: Serge Rielau
spark-sql> CREATE TABLE tttd(c1 int not null);
22/11/10 14:04:28 WARN ResolveSessionCatalog: A Hive serde table will be created as there is no table provider specified. You can set spark.sql.legacy.createHiveTableByDefault to false so that native data source table will be created instead.
22/11/10 14:04:28 WARN HiveMetaStore: Location: file:/Users/serge.rielau/spark/spark-warehouse/tttd specified for non-external table:tttd
Time taken: 0.078 seconds
spark-sql> INSERT INTO tttd VALUES(null);
Time taken: 0.36 seconds
spark-sql> SELECT * FROM tttd;
NULL
Time taken: 0.074 seconds, Fetched 1 row(s)
spark-sql>
Does hive not support NOT NULL? That's fine, but then we should fail on CREATE TABLE
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org