From 972cacca5331c56c51d481a4923be6376f84ac3b Mon Sep 17 00:00:00 2001 From: Eugene Tolbakov Date: Wed, 15 May 2024 09:16:19 +0100 Subject: [PATCH] chore: fix integration test --- src/datatypes/src/value.rs | 4 ++-- src/mito2/src/memtable/partition_tree/dict.rs | 4 ---- src/servers/src/mysql/helper.rs | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/datatypes/src/value.rs b/src/datatypes/src/value.rs index 9c9b79a4a6a9..2b8d058f7520 100644 --- a/src/datatypes/src/value.rs +++ b/src/datatypes/src/value.rs @@ -342,7 +342,7 @@ impl Value { Value::Float32(v) => ScalarValue::Float32(Some(v.0)), Value::Float64(v) => ScalarValue::Float64(Some(v.0)), Value::String(v) => ScalarValue::Utf8(Some(v.as_utf8().to_string())), - Value::Binary(v) => ScalarValue::LargeBinary(Some(v.to_vec())), + Value::Binary(v) => ScalarValue::Binary(Some(v.to_vec())), Value::Date(v) => ScalarValue::Date32(Some(v.val())), Value::DateTime(v) => ScalarValue::Date64(Some(v.val())), Value::Null => to_null_scalar_value(output_type)?, @@ -413,7 +413,7 @@ pub fn to_null_scalar_value(output_type: &ConcreteDataType) -> Result ScalarValue::UInt64(None), ConcreteDataType::Float32(_) => ScalarValue::Float32(None), ConcreteDataType::Float64(_) => ScalarValue::Float64(None), - ConcreteDataType::Binary(_) => ScalarValue::LargeBinary(None), + ConcreteDataType::Binary(_) => ScalarValue::Binary(None), ConcreteDataType::String(_) => ScalarValue::Utf8(None), ConcreteDataType::Date(_) => ScalarValue::Date32(None), ConcreteDataType::DateTime(_) => ScalarValue::Date64(None), diff --git a/src/mito2/src/memtable/partition_tree/dict.rs b/src/mito2/src/memtable/partition_tree/dict.rs index 52217dc94bc2..b841abb9cb73 100644 --- a/src/mito2/src/memtable/partition_tree/dict.rs +++ b/src/mito2/src/memtable/partition_tree/dict.rs @@ -281,10 +281,6 @@ impl Drop for KeyDict { /// Buffer to store unsorted primary keys. struct KeyBuffer { - // We use arrow's binary builder as out default binary builder - // is LargeBinaryBuilder - // TODO(yingwen): Change the type binary vector to Binary instead of LargeBinary. - /// Builder for binary key array. key_builder: BinaryBuilder, next_pk_index: usize, } diff --git a/src/servers/src/mysql/helper.rs b/src/servers/src/mysql/helper.rs index c5d509016da4..f1aede0b5d5f 100644 --- a/src/servers/src/mysql/helper.rs +++ b/src/servers/src/mysql/helper.rs @@ -159,7 +159,7 @@ pub fn convert_value(param: &ParamValue, t: &ConcreteDataType) -> Result Ok(ScalarValue::Utf8(Some( String::from_utf8_lossy(b).to_string(), ))), - ConcreteDataType::Binary(_) => Ok(ScalarValue::LargeBinary(Some(b.to_vec()))), + ConcreteDataType::Binary(_) => Ok(ScalarValue::Binary(Some(b.to_vec()))), _ => error::PreparedStmtTypeMismatchSnafu { expected: t,