Skip to content

Add print for #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2022
Merged
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
2 changes: 2 additions & 0 deletions ballista/rust/core/src/serde/logical_plan/from_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ impl TryInto<Expr> 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
Expand All @@ -1112,6 +1113,7 @@ impl TryInto<Expr> for &protobuf::LogicalExprNode {
expr.fun_name.to_string()
))
})?;
println!("found udf-------------------");
let fun_arc = fun.clone();
let fun_args = &expr.args;
let args: Vec<Expr> = fun_args
Expand Down
3 changes: 2 additions & 1 deletion ballista/rust/core/src/serde/physical_plan/from_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ impl TryFrom<&protobuf::PhysicalExprNode> for Arc<dyn PhysicalExpr> {
}
// 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
Expand All @@ -591,8 +592,8 @@ impl TryFrom<&protobuf::PhysicalExprNode> for Arc<dyn PhysicalExpr> {
&e.fun_name.to_owned()
))
})?;

let scalar_udf = &*fun.clone();
println!("found udf-------------------");
let args = e
.expr
.iter()
Expand Down
2 changes: 2 additions & 0 deletions datafusion/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand All @@ -212,6 +213,7 @@ impl ExecutionContext {
context.register_udaf((**aggregate_udf).clone())
});
}
println!("register udf to context--------success-------");
context
}

Expand Down
1 change: 1 addition & 0 deletions datafusion/src/plugin/udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ macro_rules! declare_udf_plugin {

/// get a Option of Immutable UDFPluginManager
pub fn get_udf_plugin_manager(path: &str) -> Option<UDFPluginManager> {
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);
Expand Down