Skip to content

Commit

Permalink
fix(driver): do not box nullable for null datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed Apr 27, 2023
1 parent 3977def commit a5612fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion driver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "databend-driver"
version = "0.2.20"
version = "0.2.21"
edition = "2021"
license = "Apache-2.0"
description = "Databend Driver for Rust"
Expand Down
2 changes: 1 addition & 1 deletion driver/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl TryFrom<&Arc<ArrowField>> for Field {
)))
}
};
if f.is_nullable() {
if f.is_nullable() && !matches!(dt, DataType::Null) {
dt = DataType::Nullable(Box::new(dt));
}
Ok(Field {
Expand Down
4 changes: 2 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
default: run

run: test-core test-driver test-bendsql down

prepare:
mkdir -p data/databend

Expand All @@ -19,8 +21,6 @@ test-bendsql: up
cd .. && ./cli/test.sh http
cd .. && ./cli/test.sh flight

run: test-core test-driver test-bendsql

down:
docker compose down

Expand Down

0 comments on commit a5612fc

Please sign in to comment.