Skip to content

Commit 2dad05f

Browse files
committed
chore: [1941-Part1]: Introduce map_sort scalar function
1 parent 178ab5d commit 2dad05f

File tree

5 files changed

+832
-4
lines changed

5 files changed

+832
-4
lines changed

native/spark-expr/src/comet_scalar_funcs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// under the License.
1717

1818
use crate::hash_funcs::*;
19+
use crate::map_funcs::spark_map_sort;
1920
use crate::math_funcs::checked_arithmetic::{checked_add, checked_div, checked_mul, checked_sub};
2021
use crate::math_funcs::modulo_expr::spark_modulo;
2122
use crate::{
@@ -157,6 +158,10 @@ pub fn create_comet_physical_fun(
157158
let fail_on_error = fail_on_error.unwrap_or(false);
158159
make_comet_scalar_udf!("spark_modulo", func, without data_type, fail_on_error)
159160
}
161+
"map_sort" => {
162+
let func = Arc::new(spark_map_sort);
163+
make_comet_scalar_udf!("spark_map_sort", func, without data_type)
164+
}
160165
_ => registry.udf(fun_name).map_err(|e| {
161166
DataFusionError::Execution(format!(
162167
"Function {fun_name} not found in the registry: {e}",

native/spark-expr/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ pub use bloom_filter::{BloomFilterAgg, BloomFilterMightContain};
5555

5656
mod conditional_funcs;
5757
mod conversion_funcs;
58+
mod map_funcs;
5859
mod math_funcs;
5960
mod nondetermenistic_funcs;
6061

0 commit comments

Comments
 (0)