This is an automated email from the ASF dual-hosted git repository.
huaxingao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new 65f22a20 feat: show executed native plan with metrics when in debug
mode (#746)
65f22a20 is described below
commit 65f22a207cc32f00868bdb162eb8b740610bc309
Author: Andy Grove <[email protected]>
AuthorDate: Fri Aug 2 08:40:29 2024 -0600
feat: show executed native plan with metrics when in debug mode (#746)
* show executed native plan with metrics when in debug mode
* rename variable
---
native/core/src/execution/jni_api.rs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/native/core/src/execution/jni_api.rs
b/native/core/src/execution/jni_api.rs
index d326b4f3..e4b13878 100644
--- a/native/core/src/execution/jni_api.rs
+++ b/native/core/src/execution/jni_api.rs
@@ -360,6 +360,15 @@ pub unsafe extern "system" fn
Java_org_apache_comet_Native_executePlan(
// Update metrics
update_metrics(&mut env, exec_context)?;
+ if exec_context.debug_native {
+ if let Some(plan) = &exec_context.root_op {
+ let formatted_plan_str =
+
DisplayableExecutionPlan::with_full_metrics(plan.as_ref())
+ .indent(true);
+ info!("Comet native query plan with metrics:\n
{formatted_plan_str:}");
+ }
+ }
+
let long_array = env.new_long_array(1)?;
env.set_long_array_region(&long_array, 0, &[-1])?;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]