From 304bdbdcd2c9aa766f1be893e24242ef2234633a Mon Sep 17 00:00:00 2001 From: baishen Date: Tue, 17 May 2022 19:00:25 +0800 Subject: [PATCH] fix(data type): update arrow2 to fix array nullable write --- Cargo.lock | 4 ++-- common/arrow/Cargo.toml | 2 +- .../0_stateless/03_dml/03_0023_insert_into_array.result | 7 +++++++ .../0_stateless/03_dml/03_0023_insert_into_array.sql | 9 +++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b06d10b13377b..8dedea6b7c051 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -131,8 +131,8 @@ dependencies = [ [[package]] name = "arrow2" -version = "0.11.1" -source = "git+https://github.com/datafuse-extras/arrow2?rev=2d70fbf46fd37f4ef532945c588be69a71998e44#2d70fbf46fd37f4ef532945c588be69a71998e44" +version = "0.11.2" +source = "git+https://github.com/datafuse-extras/arrow2?rev=826a2b8#826a2b8ed8598a614c5df9115ea657d1e3c40184" dependencies = [ "ahash", "arrow-format", diff --git a/common/arrow/Cargo.toml b/common/arrow/Cargo.toml index b52f6ba6e983f..41f755bcd3f18 100644 --- a/common/arrow/Cargo.toml +++ b/common/arrow/Cargo.toml @@ -31,7 +31,7 @@ simd = ["arrow/simd"] arrow = { package = "arrow2", git = "https://github.com/datafuse-extras/arrow2", default-features = false, features = [ "io_parquet", "io_parquet_compression", -], rev = "2d70fbf46fd37f4ef532945c588be69a71998e44" } +], rev = "826a2b8" } # Crates.io dependencies arrow-format = { version = "0.4.0", features = ["flight-data", "flight-service", "ipc"] } diff --git a/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.result b/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.result index 0bb7ccd3d57d9..16e7df961b7e1 100644 --- a/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.result +++ b/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.result @@ -81,3 +81,10 @@ aa bb cc dd NULL NULL ee ff +==Array(Int64) Nullable== +1 [1, 2, 3, 4] +2 [5, 6, 7, 8] +3 NULL +1 2 +5 6 +NULL NULL diff --git a/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.sql b/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.sql index cf09f6dc5ebd9..51deb6cbc14dd 100644 --- a/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.sql +++ b/tests/suites/0_stateless/03_dml/03_0023_insert_into_array.sql @@ -139,4 +139,13 @@ INSERT INTO t15 (id, arr) VALUES(1, ['aa', 'bb']), (2, ['cc', 'dd']), (3, null), select * from t15; select arr[0], arr[1] from t15; +select '==Array(Int64) Nullable=='; + +CREATE TABLE IF NOT EXISTS t16(id Int, arr Array(Int64) Null) Engine = fuse; + +INSERT INTO t16 (id, arr) VALUES(1, [1,2,3,4]), (2, [5,6,7,8]), (3, null); + +select * from t16; +select arr[0], arr[1] from t16; + DROP DATABASE db1;