Skip to content

Commit

Permalink
feat: add function CharLength & CharacterLength
Browse files Browse the repository at this point in the history
  • Loading branch information
NANASE committed Oct 30, 2024
1 parent 3761cf0 commit 2983b2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions src/function/char_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self> {
let function_name = "character_length".to_lowercase();
pub(crate) fn new() -> Arc<Self> {
let function_name = "char_length".to_lowercase();
let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)];
Arc::new(Self {
summary: FunctionSummary {
Expand All @@ -33,10 +31,12 @@ impl CharacterLength {
}
}

impl CharLength {
pub type CharacterLength = CharLength;

impl CharacterLength {
#[allow(unused_mut)]
pub(crate) fn new() -> Arc<Self> {
let function_name = "char_length".to_lowercase();
pub(crate) fn new2() -> Arc<Self> {
let function_name = "character_length".to_lowercase();
let arg_types = vec![LogicalType::Varchar(None, CharLengthUnits::Characters)];
Arc::new(Self {
summary: FunctionSummary {
Expand Down

0 comments on commit 2983b2c

Please sign in to comment.