richox commented on code in PR #1903:
URL: https://github.com/apache/auron/pull/1903#discussion_r2756975342
##########
native-engine/datafusion-ext-functions/src/lib.rs:
##########
@@ -39,51 +39,57 @@ pub fn create_auron_ext_function(
name: &str,
spark_partition_id: usize,
) -> Result<ScalarFunctionImplementation> {
+ macro_rules! cache {
+ ($func:path) => {{
+ static CELL: OnceLock<ScalarFunctionImplementation> =
OnceLock::new();
+ CELL.get_or_init(|| Arc::new($func)).clone()
+ }};
+ }
Review Comment:
i think a wrapper for `ScalarFunctionImplementation` with overriden
PartialEq/Eq implementation is better
--
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]