jesspav commented on code in PR #268: URL: https://github.com/apache/sedona-db/pull/268#discussion_r2487500275
########## rust/sedona-raster-functions/src/register.rs: ########## @@ -0,0 +1,51 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +use sedona_expr::function_set::FunctionSet; + +/// Export the set of functions defined in this crate +pub fn default_function_set() -> FunctionSet { + let mut function_set = FunctionSet::new(); + + macro_rules! register_scalar_udfs { + ($function_set:expr, $($udf:expr),* $(,)?) => { + $( + $function_set.insert_scalar_udf($udf()); + )* + }; + } + + macro_rules! register_aggregate_udfs { + ($function_set:expr, $($udf:expr),* $(,)?) => { + $( + $function_set.insert_aggregate_udf($udf()); + )* + }; + } + + register_scalar_udfs!(function_set, crate::rs_size::rs_width_udf,); + + register_aggregate_udfs!(function_set,); + + function_set +} + +/// Functions whose implementations are registered independently +/// +/// These functions are included in the default function set; however, +/// it is useful to expose them individually for testing in crates that +/// implement them. +pub mod stubs {} Review Comment: Yes, I copied the structure from Sedona-functions, but do not have any use for it now. will remove -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
