diff --git a/ballista/rust/core/src/serde/logical_plan/from_proto.rs b/ballista/rust/core/src/serde/logical_plan/from_proto.rs index 389c1bdb722e6..10cc5e156889a 100644 --- a/ballista/rust/core/src/serde/logical_plan/from_proto.rs +++ b/ballista/rust/core/src/serde/logical_plan/from_proto.rs @@ -1102,6 +1102,7 @@ impl TryInto for &protobuf::LogicalExprNode { } } ExprType::ScalarUdfProtoExpr(expr) => { + println!("from_proto to logical plan-----------------"); if let Some(udf_plugin_manager) = get_udf_plugin_manager("") { let fun = udf_plugin_manager .scalar_udfs @@ -1112,6 +1113,7 @@ impl TryInto for &protobuf::LogicalExprNode { expr.fun_name.to_string() )) })?; + println!("found udf-------------------"); let fun_arc = fun.clone(); let fun_args = &expr.args; let args: Vec = fun_args diff --git a/ballista/rust/core/src/serde/physical_plan/from_proto.rs b/ballista/rust/core/src/serde/physical_plan/from_proto.rs index 38c04ef29dd3b..1e3052ff1adb4 100644 --- a/ballista/rust/core/src/serde/physical_plan/from_proto.rs +++ b/ballista/rust/core/src/serde/physical_plan/from_proto.rs @@ -581,6 +581,7 @@ impl TryFrom<&protobuf::PhysicalExprNode> for Arc { } // argo engine add. ExprType::ScalarUdfProtoExpr(e) => { + println!("from proto to physical plan----------------"); if let Some(udf_plugin_manager) = get_udf_plugin_manager("") { let fun = udf_plugin_manager .scalar_udfs @@ -591,8 +592,8 @@ impl TryFrom<&protobuf::PhysicalExprNode> for Arc { &e.fun_name.to_owned() )) })?; - let scalar_udf = &*fun.clone(); + println!("found udf-------------------"); let args = e .expr .iter() diff --git a/datafusion/src/execution/context.rs b/datafusion/src/execution/context.rs index 5e4e3ef6b711c..066cc1b5809b6 100644 --- a/datafusion/src/execution/context.rs +++ b/datafusion/src/execution/context.rs @@ -197,6 +197,7 @@ impl ExecutionContext { }; // register udf + println!("register udf to context---------------"); if let Some(udf_plugin_manager) = get_udf_plugin_manager(config.plugin_dir.as_str()) { @@ -212,6 +213,7 @@ impl ExecutionContext { context.register_udaf((**aggregate_udf).clone()) }); } + println!("register udf to context--------success-------"); context } diff --git a/datafusion/src/plugin/udf.rs b/datafusion/src/plugin/udf.rs index a906554956e5f..9115180d8c770 100644 --- a/datafusion/src/plugin/udf.rs +++ b/datafusion/src/plugin/udf.rs @@ -136,6 +136,7 @@ macro_rules! declare_udf_plugin { /// get a Option of Immutable UDFPluginManager pub fn get_udf_plugin_manager(path: &str) -> Option { + println!("get_udf_plugin_manager:{}", path); let udf_plugin_manager_opt = { let gpm = global_plugin_manager(path).lock().unwrap(); let plugin_registrar_opt = gpm.plugin_managers.get(&PluginEnum::UDF);