This is an automated email from the ASF dual-hosted git repository.
xudong963 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 3e6d70ee71 Add test for nullable doesn't work when create memory table
(#14624)
3e6d70ee71 is described below
commit 3e6d70ee71aa2dc9579b5bcda5e5e5e1cae9a8d2
Author: xudong.w <[email protected]>
AuthorDate: Thu Feb 13 11:05:08 2025 +0800
Add test for nullable doesn't work when create memory table (#14624)
* Add test for nullable doesn't work when create memory table
* change location
---
datafusion/sqllogictest/test_files/ddl.slt | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/datafusion/sqllogictest/test_files/ddl.slt
b/datafusion/sqllogictest/test_files/ddl.slt
index 5e22907527..196e2f3051 100644
--- a/datafusion/sqllogictest/test_files/ddl.slt
+++ b/datafusion/sqllogictest/test_files/ddl.slt
@@ -840,3 +840,31 @@ DROP TABLE t1;
statement ok
DROP TABLE t2;
+
+# Test memory table fields with correct nullable
+statement ok
+CREATE or replace TABLE table_with_pk (
+ sn INT PRIMARY KEY NOT NULL,
+ ts TIMESTAMP WITH TIME ZONE NOT NULL,
+ currency VARCHAR(3) NOT NULL,
+ amount FLOAT
+ ) as VALUES
+ (0, '2022-01-01 06:00:00Z'::timestamp, 'EUR', 30.0),
+ (1, '2022-01-01 08:00:00Z'::timestamp, 'EUR', 50.0),
+ (2, '2022-01-01 11:30:00Z'::timestamp, 'TRY', 75.0),
+ (3, '2022-01-02 12:00:00Z'::timestamp, 'EUR', 200.0);
+
+query TTTTTT
+show columns FROM table_with_pk;
+----
+datafusion public table_with_pk sn Int32 NO
+datafusion public table_with_pk ts Timestamp(Nanosecond, Some("+00:00")) NO
+datafusion public table_with_pk currency Utf8 NO
+datafusion public table_with_pk amount Float32 YES
+
+statement ok
+drop table table_with_pk;
+
+statement ok
+set datafusion.catalog.information_schema = false;
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]