Skip to content

Commit

Permalink
fix(driver): support data type Nothing (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Sep 13, 2023
1 parent e4ff34e commit d787814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bindings.python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
run: make -C tests test-bindings-python

build:
if: startsWith(github.ref, 'refs/tags/v')
name: build-${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
Expand Down
3 changes: 3 additions & 0 deletions sql/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ impl DecimalDataType {
#[derive(Debug, Clone)]
pub enum DataType {
Null,
Nothing,
EmptyArray,
EmptyMap,
Boolean,
Expand Down Expand Up @@ -90,6 +91,7 @@ impl std::fmt::Display for DataType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
DataType::Null => write!(f, "Null"),
DataType::Nothing => write!(f, "Nothing"),
DataType::EmptyArray => write!(f, "EmptyArray"),
DataType::EmptyMap => write!(f, "EmptyMap"),
DataType::Boolean => write!(f, "Boolean"),
Expand Down Expand Up @@ -156,6 +158,7 @@ impl TryFrom<&TypeDesc<'_>> for DataType {
fn try_from(desc: &TypeDesc) -> Result<Self> {
let dt = match desc.name {
"Null" | "NULL" => DataType::Null,
"Nothing" => DataType::Nothing,
"Boolean" => DataType::Boolean,
"String" => DataType::String,
"Int8" => DataType::Number(NumberDataType::Int8),
Expand Down

0 comments on commit d787814

Please sign in to comment.