From fb448095c1a78b0155e67454b284709b1a3f6e68 Mon Sep 17 00:00:00 2001 From: NANASE Date: Sun, 20 Oct 2024 02:56:07 +0800 Subject: [PATCH 1/6] feat: add function Lower & Upper --- src/db.rs | 4 ++ src/function/lower.rs | 72 ++++++++++++++++++++++++++++++++++ src/function/mod.rs | 2 + src/function/upper.rs | 72 ++++++++++++++++++++++++++++++++++ tests/slt/sql_2016/E021_08.slt | 36 ++++++++++++----- 5 files changed, 177 insertions(+), 9 deletions(-) create mode 100644 src/function/lower.rs create mode 100644 src/function/upper.rs diff --git a/src/db.rs b/src/db.rs index 2a87fd2a..61bf6e3d 100644 --- a/src/db.rs +++ b/src/db.rs @@ -6,7 +6,9 @@ use crate::expression::function::scala::ScalarFunctionImpl; use crate::expression::function::table::TableFunctionImpl; use crate::expression::function::FunctionSummary; use crate::function::current_date::CurrentDate; +use crate::function::lower::Lower; use crate::function::numbers::Numbers; +use crate::function::upper::Upper; use crate::optimizer::heuristic::batch::HepBatchStrategy; use crate::optimizer::heuristic::optimizer::HepOptimizer; use crate::optimizer::rule::implementation::ImplementationRuleImpl; @@ -49,6 +51,8 @@ impl DataBaseBuilder { table_functions: Default::default(), }; builder = builder.register_scala_function(CurrentDate::new()); + builder = builder.register_scala_function(Lower::new()); + builder = builder.register_scala_function(Upper::new()); builder = builder.register_table_function(Numbers::new()); builder } diff --git a/src/function/lower.rs b/src/function/lower.rs new file mode 100644 index 00000000..fd5b55be --- /dev/null +++ b/src/function/lower.rs @@ -0,0 +1,72 @@ +use crate::catalog::ColumnRef; +use crate::errors::DatabaseError; +use crate::expression::function::scala::FuncMonotonicity; +use crate::expression::function::scala::ScalarFunctionImpl; +use crate::expression::function::FunctionSummary; +use crate::expression::ScalarExpression; +use crate::types::tuple::Tuple; +use crate::types::value::DataValue; +use crate::types::LogicalType; +use serde::Deserialize; +use serde::Serialize; +use sqlparser::ast::CharLengthUnits; +use std::sync::Arc; + +#[derive(Debug, Serialize, Deserialize)] +pub(crate) struct Lower { + summary: FunctionSummary, +} + +impl Lower { + #[allow(unused_mut)] + pub(crate) fn new() -> Arc { + let function_name = "lower".to_lowercase(); + let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; + Arc::new(Self { + summary: FunctionSummary { + name: function_name, + arg_types, + }, + }) + } +} + +#[typetag::serde] +impl ScalarFunctionImpl for Lower { + #[allow(unused_variables, clippy::redundant_closure_call)] + fn eval( + &self, + exprs: &[ScalarExpression], + tuples: &Tuple, + columns: &[ColumnRef], + ) -> Result { + let value = exprs[0].eval(tuples, columns)?; + let mut value = DataValue::clone(&value); + if !matches!(value.logical_type(), LogicalType::Varchar(_, _)) { + value = DataValue::clone(&value) + .cast(&LogicalType::Varchar(None, CharLengthUnits::Characters))?; + } + if let DataValue::Utf8 { + value: Some(value), + ty, + unit, + } = &mut value + { + *value = value.to_lowercase(); + } + Ok(value) + + } + + fn monotonicity(&self) -> Option { + todo!() + } + + fn return_type(&self) -> &LogicalType { + &LogicalType::Varchar(None, CharLengthUnits::Characters) + } + + fn summary(&self) -> &FunctionSummary { + &self.summary + } +} diff --git a/src/function/mod.rs b/src/function/mod.rs index a469edb3..9026a026 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -1,2 +1,4 @@ pub(crate) mod current_date; pub(crate) mod numbers; +pub(crate) mod lower; +pub(crate) mod upper; \ No newline at end of file diff --git a/src/function/upper.rs b/src/function/upper.rs new file mode 100644 index 00000000..dc5e775c --- /dev/null +++ b/src/function/upper.rs @@ -0,0 +1,72 @@ +use crate::catalog::ColumnRef; +use crate::errors::DatabaseError; +use crate::expression::function::scala::FuncMonotonicity; +use crate::expression::function::scala::ScalarFunctionImpl; +use crate::expression::function::FunctionSummary; +use crate::expression::ScalarExpression; +use crate::types::tuple::Tuple; +use crate::types::value::DataValue; +use crate::types::LogicalType; +use serde::Deserialize; +use serde::Serialize; +use sqlparser::ast::CharLengthUnits; +use std::sync::Arc; + +#[derive(Debug, Serialize, Deserialize)] +pub(crate) struct Upper { + summary: FunctionSummary, +} + +impl Upper { + #[allow(unused_mut)] + pub(crate) fn new() -> Arc { + let function_name = "upper".to_lowercase(); + let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; + Arc::new(Self { + summary: FunctionSummary { + name: function_name, + arg_types, + }, + }) + } +} + +#[typetag::serde] +impl ScalarFunctionImpl for Upper { + #[allow(unused_variables, clippy::redundant_closure_call)] + fn eval( + &self, + exprs: &[ScalarExpression], + tuples: &Tuple, + columns: &[ColumnRef], + ) -> Result { + let value = exprs[0].eval(tuples, columns)?; + let mut value = DataValue::clone(&value); + if !matches!(value.logical_type(), LogicalType::Varchar(_, _)) { + value = DataValue::clone(&value) + .cast(&LogicalType::Varchar(None, CharLengthUnits::Characters))?; + } + if let DataValue::Utf8 { + value: Some(value), + ty, + unit, + } = &mut value + { + *value = value.to_uppercase(); + } + Ok(value) + + } + + fn monotonicity(&self) -> Option { + todo!() + } + + fn return_type(&self) -> &LogicalType { + &LogicalType::Varchar(None, CharLengthUnits::Characters) + } + + fn summary(&self) -> &FunctionSummary { + &self.summary + } +} diff --git a/tests/slt/sql_2016/E021_08.slt b/tests/slt/sql_2016/E021_08.slt index 8c0ba89a..49214b9c 100644 --- a/tests/slt/sql_2016/E021_08.slt +++ b/tests/slt/sql_2016/E021_08.slt @@ -1,13 +1,31 @@ # E021-08: UPPER and LOWER functions -# TODO: LOWER()/UPPER() +query T +SELECT LOWER ( 'FOO' ) +---- +foo -# query T -# SELECT LOWER ( 'foo' ) -# ---- -# 'foo' +query T +SELECT LOWER ( 'foo' ) +---- +foo -# query T -# SELECT UPPER ( 'foo' ) -# ---- -# 'FOO' +query T +SELECT UPPER ( 'foo' ) +---- +FOO + +query T +SELECT UPPER ( 'FOO' ) +---- +FOO + +query T +SELECT UPPER ( LOWER ( 'FOO' ) ) +---- +FOO + +query T +SELECT LOWER ( UPPER ( 'foo' ) ) +---- +foo From 643b469616e15da891b80638f78c3ba0f2bd2869 Mon Sep 17 00:00:00 2001 From: NANASE Date: Sun, 20 Oct 2024 03:08:42 +0800 Subject: [PATCH 2/6] chore: codefmt --- src/function/lower.rs | 1 - src/function/mod.rs | 4 ++-- src/function/upper.rs | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/function/lower.rs b/src/function/lower.rs index fd5b55be..86ed71e3 100644 --- a/src/function/lower.rs +++ b/src/function/lower.rs @@ -55,7 +55,6 @@ impl ScalarFunctionImpl for Lower { *value = value.to_lowercase(); } Ok(value) - } fn monotonicity(&self) -> Option { diff --git a/src/function/mod.rs b/src/function/mod.rs index 9026a026..e48c7c2d 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -1,4 +1,4 @@ pub(crate) mod current_date; -pub(crate) mod numbers; pub(crate) mod lower; -pub(crate) mod upper; \ No newline at end of file +pub(crate) mod numbers; +pub(crate) mod upper; diff --git a/src/function/upper.rs b/src/function/upper.rs index dc5e775c..bc346aa2 100644 --- a/src/function/upper.rs +++ b/src/function/upper.rs @@ -55,7 +55,6 @@ impl ScalarFunctionImpl for Upper { *value = value.to_uppercase(); } Ok(value) - } fn monotonicity(&self) -> Option { From f6c1afa21c6f6f8b5133eb35ef0166e42b3835ea Mon Sep 17 00:00:00 2001 From: NANASE Date: Sun, 20 Oct 2024 23:49:24 +0800 Subject: [PATCH 3/6] feat: add functions CharLength & CharacterLength --- src/db.rs | 4 ++ src/function/characterlength.rs | 72 +++++++++++++++++++++++++++++++++ src/function/charlength.rs | 72 +++++++++++++++++++++++++++++++++ src/function/mod.rs | 2 + tests/slt/sql_2016/E021_04.slt | 25 +++++++----- 5 files changed, 166 insertions(+), 9 deletions(-) create mode 100644 src/function/characterlength.rs create mode 100644 src/function/charlength.rs diff --git a/src/db.rs b/src/db.rs index 61bf6e3d..de180acb 100644 --- a/src/db.rs +++ b/src/db.rs @@ -5,6 +5,8 @@ use crate::execution::{build_write, try_collect}; use crate::expression::function::scala::ScalarFunctionImpl; use crate::expression::function::table::TableFunctionImpl; use crate::expression::function::FunctionSummary; +use crate::function::characterlength::CharacterLength; +use crate::function::charlength::CharLength; use crate::function::current_date::CurrentDate; use crate::function::lower::Lower; use crate::function::numbers::Numbers; @@ -50,6 +52,8 @@ impl DataBaseBuilder { scala_functions: Default::default(), table_functions: Default::default(), }; + builder = builder.register_scala_function(CharLength::new()); + builder = builder.register_scala_function(CharacterLength::new()); builder = builder.register_scala_function(CurrentDate::new()); builder = builder.register_scala_function(Lower::new()); builder = builder.register_scala_function(Upper::new()); diff --git a/src/function/characterlength.rs b/src/function/characterlength.rs new file mode 100644 index 00000000..f1709643 --- /dev/null +++ b/src/function/characterlength.rs @@ -0,0 +1,72 @@ +use crate::catalog::ColumnRef; +use crate::errors::DatabaseError; +use crate::expression::function::scala::FuncMonotonicity; +use crate::expression::function::scala::ScalarFunctionImpl; +use crate::expression::function::FunctionSummary; +use crate::expression::ScalarExpression; +use crate::types::tuple::Tuple; +use crate::types::value::DataValue; +use crate::types::LogicalType; +use serde::Deserialize; +use serde::Serialize; +use sqlparser::ast::CharLengthUnits; +use std::sync::Arc; + +#[derive(Debug, Serialize, Deserialize)] +pub(crate) struct CharacterLength { + summary: FunctionSummary, +} + +impl CharacterLength { + #[allow(unused_mut)] + pub(crate) fn new() -> Arc { + let function_name = "character_length".to_lowercase(); + let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; + Arc::new(Self { + summary: FunctionSummary { + name: function_name, + arg_types, + }, + }) + } +} + +#[typetag::serde] +impl ScalarFunctionImpl for CharacterLength { + #[allow(unused_variables, clippy::redundant_closure_call)] + fn eval( + &self, + exprs: &[ScalarExpression], + tuples: &Tuple, + columns: &[ColumnRef], + ) -> Result { + let value = exprs[0].eval(tuples, columns)?; + let mut value = DataValue::clone(&value); + if !matches!(value.logical_type(), LogicalType::Varchar(_, _)) { + value = DataValue::clone(&value) + .cast(&LogicalType::Varchar(None, CharLengthUnits::Characters))?; + } + let mut length: u64 = 0; + if let DataValue::Utf8 { + value: Some(value), + ty, + unit, + } = &mut value + { + length = value.len() as u64; + } + Ok(DataValue::UInt64(Some(length))) + } + + fn monotonicity(&self) -> Option { + todo!() + } + + fn return_type(&self) -> &LogicalType { + &LogicalType::Varchar(None, CharLengthUnits::Characters) + } + + fn summary(&self) -> &FunctionSummary { + &self.summary + } +} diff --git a/src/function/charlength.rs b/src/function/charlength.rs new file mode 100644 index 00000000..b67a33e4 --- /dev/null +++ b/src/function/charlength.rs @@ -0,0 +1,72 @@ +use crate::catalog::ColumnRef; +use crate::errors::DatabaseError; +use crate::expression::function::scala::FuncMonotonicity; +use crate::expression::function::scala::ScalarFunctionImpl; +use crate::expression::function::FunctionSummary; +use crate::expression::ScalarExpression; +use crate::types::tuple::Tuple; +use crate::types::value::DataValue; +use crate::types::LogicalType; +use serde::Deserialize; +use serde::Serialize; +use sqlparser::ast::CharLengthUnits; +use std::sync::Arc; + +#[derive(Debug, Serialize, Deserialize)] +pub(crate) struct CharLength { + summary: FunctionSummary, +} + +impl CharLength { + #[allow(unused_mut)] + pub(crate) fn new() -> Arc { + let function_name = "char_length".to_lowercase(); + let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; + Arc::new(Self { + summary: FunctionSummary { + name: function_name, + arg_types, + }, + }) + } +} + +#[typetag::serde] +impl ScalarFunctionImpl for CharLength { + #[allow(unused_variables, clippy::redundant_closure_call)] + fn eval( + &self, + exprs: &[ScalarExpression], + tuples: &Tuple, + columns: &[ColumnRef], + ) -> Result { + let value = exprs[0].eval(tuples, columns)?; + let mut value = DataValue::clone(&value); + if !matches!(value.logical_type(), LogicalType::Varchar(_, _)) { + value = DataValue::clone(&value) + .cast(&LogicalType::Varchar(None, CharLengthUnits::Characters))?; + } + let mut length: u64 = 0; + if let DataValue::Utf8 { + value: Some(value), + ty, + unit, + } = &mut value + { + length = value.len() as u64; + } + Ok(DataValue::UInt64(Some(length))) + } + + fn monotonicity(&self) -> Option { + todo!() + } + + fn return_type(&self) -> &LogicalType { + &LogicalType::Varchar(None, CharLengthUnits::Characters) + } + + fn summary(&self) -> &FunctionSummary { + &self.summary + } +} diff --git a/src/function/mod.rs b/src/function/mod.rs index e48c7c2d..ad3267df 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -1,3 +1,5 @@ +pub(crate) mod characterlength; +pub(crate) mod charlength; pub(crate) mod current_date; pub(crate) mod lower; pub(crate) mod numbers; diff --git a/tests/slt/sql_2016/E021_04.slt b/tests/slt/sql_2016/E021_04.slt index dc7a3a52..085213f4 100644 --- a/tests/slt/sql_2016/E021_04.slt +++ b/tests/slt/sql_2016/E021_04.slt @@ -1,14 +1,21 @@ # E021-04: CHARACTER_LENGTH function -# TODO: CHARACTER_LENGTH()/CHAR_LENGTH() +query I +SELECT CHARACTER_LENGTH ( 'foo' ) +---- +3 -# query I -# SELECT CHARACTER_LENGTH ( 'foo' ) -# ---- -# 3 +query I +SELECT CHARACTER_LENGTH ( 'foooof' ) +---- +6 +query I +SELECT CHAR_LENGTH ( 'foo' ) +---- +3 -# query I -# SELECT CHAR_LENGTH ( 'foo' ) -# ---- -# 3 +query I +SELECT CHAR_LENGTH ( 'foooof' ) +---- +6 From 3761cf096ec51396299b92146eae7c3010a29205 Mon Sep 17 00:00:00 2001 From: NANASE Date: Wed, 30 Oct 2024 23:41:36 +0800 Subject: [PATCH 4/6] refactor --- src/db.rs | 6 +- .../{charlength.rs => char_length.rs} | 16 +++++ src/function/characterlength.rs | 72 ------------------- src/function/mod.rs | 3 +- tests/slt/sql_2016/E021_04.slt | 10 --- 5 files changed, 20 insertions(+), 87 deletions(-) rename src/function/{charlength.rs => char_length.rs} (82%) delete mode 100644 src/function/characterlength.rs diff --git a/src/db.rs b/src/db.rs index de180acb..efacbca9 100644 --- a/src/db.rs +++ b/src/db.rs @@ -5,8 +5,8 @@ use crate::execution::{build_write, try_collect}; use crate::expression::function::scala::ScalarFunctionImpl; use crate::expression::function::table::TableFunctionImpl; use crate::expression::function::FunctionSummary; -use crate::function::characterlength::CharacterLength; -use crate::function::charlength::CharLength; +use crate::function::char_length::CharLength; +use crate::function::char_length::CharacterLength; use crate::function::current_date::CurrentDate; use crate::function::lower::Lower; use crate::function::numbers::Numbers; @@ -53,7 +53,7 @@ impl DataBaseBuilder { table_functions: Default::default(), }; builder = builder.register_scala_function(CharLength::new()); - builder = builder.register_scala_function(CharacterLength::new()); + builder = builder.register_scala_function(CharacterLength::new2()); builder = builder.register_scala_function(CurrentDate::new()); builder = builder.register_scala_function(Lower::new()); builder = builder.register_scala_function(Upper::new()); diff --git a/src/function/charlength.rs b/src/function/char_length.rs similarity index 82% rename from src/function/charlength.rs rename to src/function/char_length.rs index b67a33e4..d4dc1383 100644 --- a/src/function/charlength.rs +++ b/src/function/char_length.rs @@ -17,6 +17,22 @@ pub(crate) struct CharLength { summary: FunctionSummary, } +pub type CharacterLength = CharLength; + +impl CharacterLength { + #[allow(unused_mut)] + pub(crate) fn new2() -> Arc { + let function_name = "character_length".to_lowercase(); + let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; + Arc::new(Self { + summary: FunctionSummary { + name: function_name, + arg_types, + }, + }) + } +} + impl CharLength { #[allow(unused_mut)] pub(crate) fn new() -> Arc { diff --git a/src/function/characterlength.rs b/src/function/characterlength.rs deleted file mode 100644 index f1709643..00000000 --- a/src/function/characterlength.rs +++ /dev/null @@ -1,72 +0,0 @@ -use crate::catalog::ColumnRef; -use crate::errors::DatabaseError; -use crate::expression::function::scala::FuncMonotonicity; -use crate::expression::function::scala::ScalarFunctionImpl; -use crate::expression::function::FunctionSummary; -use crate::expression::ScalarExpression; -use crate::types::tuple::Tuple; -use crate::types::value::DataValue; -use crate::types::LogicalType; -use serde::Deserialize; -use serde::Serialize; -use sqlparser::ast::CharLengthUnits; -use std::sync::Arc; - -#[derive(Debug, Serialize, Deserialize)] -pub(crate) struct CharacterLength { - summary: FunctionSummary, -} - -impl CharacterLength { - #[allow(unused_mut)] - pub(crate) fn new() -> Arc { - let function_name = "character_length".to_lowercase(); - let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; - Arc::new(Self { - summary: FunctionSummary { - name: function_name, - arg_types, - }, - }) - } -} - -#[typetag::serde] -impl ScalarFunctionImpl for CharacterLength { - #[allow(unused_variables, clippy::redundant_closure_call)] - fn eval( - &self, - exprs: &[ScalarExpression], - tuples: &Tuple, - columns: &[ColumnRef], - ) -> Result { - let value = exprs[0].eval(tuples, columns)?; - let mut value = DataValue::clone(&value); - if !matches!(value.logical_type(), LogicalType::Varchar(_, _)) { - value = DataValue::clone(&value) - .cast(&LogicalType::Varchar(None, CharLengthUnits::Characters))?; - } - let mut length: u64 = 0; - if let DataValue::Utf8 { - value: Some(value), - ty, - unit, - } = &mut value - { - length = value.len() as u64; - } - Ok(DataValue::UInt64(Some(length))) - } - - fn monotonicity(&self) -> Option { - todo!() - } - - fn return_type(&self) -> &LogicalType { - &LogicalType::Varchar(None, CharLengthUnits::Characters) - } - - fn summary(&self) -> &FunctionSummary { - &self.summary - } -} diff --git a/src/function/mod.rs b/src/function/mod.rs index ad3267df..6c660c57 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -1,5 +1,4 @@ -pub(crate) mod characterlength; -pub(crate) mod charlength; +pub(crate) mod char_length; pub(crate) mod current_date; pub(crate) mod lower; pub(crate) mod numbers; diff --git a/tests/slt/sql_2016/E021_04.slt b/tests/slt/sql_2016/E021_04.slt index 085213f4..72ec6019 100644 --- a/tests/slt/sql_2016/E021_04.slt +++ b/tests/slt/sql_2016/E021_04.slt @@ -5,17 +5,7 @@ SELECT CHARACTER_LENGTH ( 'foo' ) ---- 3 -query I -SELECT CHARACTER_LENGTH ( 'foooof' ) ----- -6 - query I SELECT CHAR_LENGTH ( 'foo' ) ---- 3 - -query I -SELECT CHAR_LENGTH ( 'foooof' ) ----- -6 From 2983b2cf1a014b59a709b1668798e104eeee46d9 Mon Sep 17 00:00:00 2001 From: NANASE Date: Thu, 31 Oct 2024 00:23:39 +0800 Subject: [PATCH 5/6] feat: add function CharLength & CharacterLength --- src/db.rs | 2 +- src/function/char_length.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/db.rs b/src/db.rs index efacbca9..39ae6dbb 100644 --- a/src/db.rs +++ b/src/db.rs @@ -5,8 +5,8 @@ use crate::execution::{build_write, try_collect}; use crate::expression::function::scala::ScalarFunctionImpl; use crate::expression::function::table::TableFunctionImpl; use crate::expression::function::FunctionSummary; -use crate::function::char_length::CharLength; use crate::function::char_length::CharacterLength; +use crate::function::char_length::CharLength; use crate::function::current_date::CurrentDate; use crate::function::lower::Lower; use crate::function::numbers::Numbers; diff --git a/src/function/char_length.rs b/src/function/char_length.rs index d4dc1383..b5a94d44 100644 --- a/src/function/char_length.rs +++ b/src/function/char_length.rs @@ -17,12 +17,10 @@ pub(crate) struct CharLength { summary: FunctionSummary, } -pub type CharacterLength = CharLength; - -impl CharacterLength { +impl CharLength { #[allow(unused_mut)] - pub(crate) fn new2() -> Arc { - let function_name = "character_length".to_lowercase(); + pub(crate) fn new() -> Arc { + let function_name = "char_length".to_lowercase(); let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; Arc::new(Self { summary: FunctionSummary { @@ -33,10 +31,12 @@ impl CharacterLength { } } -impl CharLength { +pub type CharacterLength = CharLength; + +impl CharacterLength { #[allow(unused_mut)] - pub(crate) fn new() -> Arc { - let function_name = "char_length".to_lowercase(); + pub(crate) fn new2() -> Arc { + let function_name = "character_length".to_lowercase(); let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)]; Arc::new(Self { summary: FunctionSummary { From 0b2e8ab292103c3a7af410b0d80de1992f8af44b Mon Sep 17 00:00:00 2001 From: NANASE Date: Thu, 31 Oct 2024 00:26:56 +0800 Subject: [PATCH 6/6] chore: codefmt --- src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 39ae6dbb..efacbca9 100644 --- a/src/db.rs +++ b/src/db.rs @@ -5,8 +5,8 @@ use crate::execution::{build_write, try_collect}; use crate::expression::function::scala::ScalarFunctionImpl; use crate::expression::function::table::TableFunctionImpl; use crate::expression::function::FunctionSummary; -use crate::function::char_length::CharacterLength; use crate::function::char_length::CharLength; +use crate::function::char_length::CharacterLength; use crate::function::current_date::CurrentDate; use crate::function::lower::Lower; use crate::function::numbers::Numbers;