Skip to content

Commit

Permalink
address comments & fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ConeyLiu committed Oct 23, 2024
1 parent 0d76436 commit a232e30
Show file tree
Hide file tree
Showing 29 changed files with 123 additions and 115 deletions.
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/capitalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Capitalize {
self
}
fn name(&self) -> &'static str {
"utf8_capitalize"
"capitalize"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/contains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Contains {
self
}
fn name(&self) -> &'static str {
"utf8_contains"
"contains"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/endswith.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Endswith {
self
}
fn name(&self) -> &'static str {
"utf8_endswith"
"endswith"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ScalarUDF for Utf8Extract {
self
}
fn name(&self) -> &'static str {
"utf8_extract"
"extract"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/extract_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ScalarUDF for Utf8ExtractAll {
self
}
fn name(&self) -> &'static str {
"utf8_extract_all"
"extractall"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Find {
self
}
fn name(&self) -> &'static str {
"utf8_find"
"find"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/ilike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Ilike {
self
}
fn name(&self) -> &'static str {
"utf8_ilike"
"ilike"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/left.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Left {
self
}
fn name(&self) -> &'static str {
"utf8_left"
"left"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Length {
self
}
fn name(&self) -> &'static str {
"utf8_length"
"length"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/length_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8LengthBytes {
self
}
fn name(&self) -> &'static str {
"utf8_length_bytes"
"length_bytes"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Like {
self
}
fn name(&self) -> &'static str {
"utf8_like"
"like"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Lower {
self
}
fn name(&self) -> &'static str {
"utf8_lower"
"lower"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/lpad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Lpad {
self
}
fn name(&self) -> &'static str {
"utf8_lpad"
"lpad"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/lstrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Lstrip {
self
}
fn name(&self) -> &'static str {
"utf8_lstrip"
"lstrip"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/match_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Match {
self
}
fn name(&self) -> &'static str {
"utf8_match"
"match"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ScalarUDF for Utf8Normalize {
self
}
fn name(&self) -> &'static str {
"utf8_normalize"
"normalize"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Repeat {
self
}
fn name(&self) -> &'static str {
"utf8_repeat"
"repeat"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ScalarUDF for Utf8Replace {
self
}
fn name(&self) -> &'static str {
"utf8_replace"
"replace"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/reverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Reverse {
self
}
fn name(&self) -> &'static str {
"utf8_reverse"
"reverse"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
4 changes: 2 additions & 2 deletions src/daft-functions/src/utf8/right.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Right {
self
}
fn name(&self) -> &'static str {
"utf8_right"
"right"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand All @@ -30,7 +30,7 @@ impl ScalarUDF for Utf8Right {
Ok(Field::new(data_field.name, DataType::Utf8))
}
_ => Err(DaftError::TypeError(format!(
"Expects inputs to left to be utf8 and integer, but received {data_field} and {nchars_field}",
"Expects inputs to right to be utf8 and integer, but received {data_field} and {nchars_field}",
))),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/rpad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Rpad {
self
}
fn name(&self) -> &'static str {
"utf8_rpad"
"rpad"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/rstrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Rstrip {
self
}
fn name(&self) -> &'static str {
"utf8_rstrip"
"rstrip"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ScalarUDF for Utf8Split {
self
}
fn name(&self) -> &'static str {
"utf8_split"
"split"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/startswith.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Startswith {
self
}
fn name(&self) -> &'static str {
"utf8_startswith"
"startswith"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/substr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Substr {
self
}
fn name(&self) -> &'static str {
"utf8_substr"
"substr"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/to_date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ScalarUDF for Utf8ToDate {
self
}
fn name(&self) -> &'static str {
"utf8_to_date"
"to_date"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/to_datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl ScalarUDF for Utf8ToDatetime {
self
}
fn name(&self) -> &'static str {
"utf8_to_datetime"
"to_datetime"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-functions/src/utf8/upper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ScalarUDF for Utf8Upper {
self
}
fn name(&self) -> &'static str {
"utf8_upper"
"upper"
}

fn to_field(&self, inputs: &[ExprRef], schema: &Schema) -> DaftResult<Field> {
Expand Down
Loading

0 comments on commit a232e30

Please sign in to comment.