Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/user-guide/latest/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ These settings can be used to determine which parts of the plan are accelerated
| `spark.comet.expression.StringRepeat.enabled` | Enable Comet acceleration for `StringRepeat` | true |
| `spark.comet.expression.StringReplace.enabled` | Enable Comet acceleration for `StringReplace` | true |
| `spark.comet.expression.StringSpace.enabled` | Enable Comet acceleration for `StringSpace` | true |
| `spark.comet.expression.StringSplit.enabled` | Enable Comet acceleration for `StringSplit` | true |
| `spark.comet.expression.StringTranslate.enabled` | Enable Comet acceleration for `StringTranslate` | true |
| `spark.comet.expression.StringTrim.enabled` | Enable Comet acceleration for `StringTrim` | true |
| `spark.comet.expression.StringTrimBoth.enabled` | Enable Comet acceleration for `StringTrimBoth` | true |
Expand Down
5 changes: 5 additions & 0 deletions fuzz-testing/src/main/scala/org/apache/comet/fuzz/Meta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ object Meta {
FunctionSignature(Seq(SparkStringType, SparkIntegralType)),
FunctionSignature(Seq(SparkStringType, SparkIntegralType, SparkStringType)))),
createUnaryStringFunction("rtrim"),
createFunctions(
"split",
Seq(
FunctionSignature(Seq(SparkStringType, SparkStringType)),
FunctionSignature(Seq(SparkStringType, SparkStringType, SparkIntType)))),
createFunctionWithInputTypes("starts_with", Seq(SparkStringType, SparkStringType)),
createFunctionWithInputTypes("string_space", Seq(SparkIntType)),
createFunctionWithInputTypes("substring", Seq(SparkStringType, SparkIntType, SparkIntType)),
Expand Down
4 changes: 4 additions & 0 deletions native/spark-expr/src/comet_scalar_funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ pub fn create_comet_physical_fun_with_eval_mode(
let func = Arc::new(abs);
make_comet_scalar_udf!("abs", func, without data_type)
}
"split" => {
let func = Arc::new(crate::string_funcs::spark_split);
make_comet_scalar_udf!("split", func, without data_type)
}
_ => registry.udf(fun_name).map_err(|e| {
DataFusionError::Execution(format!(
"Function {fun_name} not found in the registry: {e}",
Expand Down
2 changes: 2 additions & 0 deletions native/spark-expr/src/string_funcs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
// specific language governing permissions and limitations
// under the License.

mod split;
mod string_space;
mod substring;

pub use split::spark_split;
pub use string_space::SparkStringSpace;
pub use substring::SubstringExpr;
Loading
Loading