From edffe28901bf65654049afc12965ecf58b0e638d Mon Sep 17 00:00:00 2001 From: gaojun2048 Date: Wed, 2 Mar 2022 13:31:44 +0800 Subject: [PATCH] Add print (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加更多的日志打印 --- datafusion/src/plugin/plugin_manager.rs | 4 +++- datafusion/src/plugin/udf.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/datafusion/src/plugin/plugin_manager.rs b/datafusion/src/plugin/plugin_manager.rs index 764e94157a00..f40fd3f33769 100644 --- a/datafusion/src/plugin/plugin_manager.rs +++ b/datafusion/src/plugin/plugin_manager.rs @@ -67,6 +67,7 @@ impl GlobalPluginManager { let plugin_files = self.get_all_plugin_files(plugin_path)?; for plugin_file in plugin_files { + println!("load library :{}", plugin_file.path().to_str().unwrap()); let library = Library::new(plugin_file.path()).map_err(|e| { DataFusionError::IoError(io::Error::new( io::ErrorKind::Other, @@ -90,9 +91,10 @@ impl GlobalPluginManager { // ersion checks to prevent accidental ABI incompatibilities if dec.rustc_version != RUSTC_VERSION || dec.core_version != CORE_VERSION { + println!("Version mismatch rustc_version:{}, core_version:{}", RUSTC_VERSION, CORE_VERSION); return Err(DataFusionError::IoError(io::Error::new( io::ErrorKind::Other, - "Version mismatch", + format!("Version mismatch rustc_version:{}, core_version:{}", RUSTC_VERSION, CORE_VERSION), ))); } diff --git a/datafusion/src/plugin/udf.rs b/datafusion/src/plugin/udf.rs index 0c61fc2b35b9..2b87daa34ac5 100644 --- a/datafusion/src/plugin/udf.rs +++ b/datafusion/src/plugin/udf.rs @@ -63,7 +63,7 @@ impl PluginRegistrar for UDFPluginManager { format!("not found fn registrar_udf_plugin in the library: {}", e), )) })?; - + println!("1111111111111111111111"); let udf_plugin: Box = register_fun(); udf_plugin .udf_names() @@ -128,6 +128,7 @@ macro_rules! declare_udf_plugin { // make sure the constructor is the correct type. let constructor: fn() -> $curr_plugin_type = $constructor; let object = constructor(); + println!("I be called"); Box::new(object) }