This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 49a9956986 [Enhencement](Profile) add profile info for jdbc scanner 
#18569
49a9956986 is described below

commit 49a995698618f98c4ace3d5b2ca68ee6b3891efe
Author: Tiewei Fang <43782773+bepppo...@users.noreply.github.com>
AuthorDate: Wed Apr 12 10:47:21 2023 +0800

    [Enhencement](Profile) add profile info for jdbc scanner #18569
---
 be/src/runtime/plan_fragment_executor.cpp | 2 ++
 be/src/vec/exec/scan/new_jdbc_scanner.cpp | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/be/src/runtime/plan_fragment_executor.cpp 
b/be/src/runtime/plan_fragment_executor.cpp
index 76b67ab099..701a22601e 100644
--- a/be/src/runtime/plan_fragment_executor.cpp
+++ b/be/src/runtime/plan_fragment_executor.cpp
@@ -20,6 +20,7 @@
 
 #include "runtime/plan_fragment_executor.h"
 
+#include <gen_cpp/version.h>
 #include <thrift/protocol/TDebugProtocol.h>
 
 #include <unordered_map>
@@ -204,6 +205,7 @@ Status PlanFragmentExecutor::prepare(const 
TExecPlanFragmentParams& request,
 
     // set up profile counters
     profile()->add_child(_plan->runtime_profile(), true, nullptr);
+    profile()->add_info_string("DoriBeVersion", DORIS_BUILD_SHORT_HASH);
     _rows_produced_counter = ADD_COUNTER(profile(), "RowsProduced", 
TUnit::UNIT);
     _blocks_produced_counter = ADD_COUNTER(profile(), "BlocksProduced", 
TUnit::UNIT);
     _fragment_cpu_timer = ADD_TIMER(profile(), "FragmentCpuTime");
diff --git a/be/src/vec/exec/scan/new_jdbc_scanner.cpp 
b/be/src/vec/exec/scan/new_jdbc_scanner.cpp
index 0091efc7cd..b74e279d97 100644
--- a/be/src/vec/exec/scan/new_jdbc_scanner.cpp
+++ b/be/src/vec/exec/scan/new_jdbc_scanner.cpp
@@ -77,6 +77,11 @@ Status NewJdbcScanner::prepare(RuntimeState* state, 
VExprContext** vconjunct_ctx
     _jdbc_param.query_string = std::move(_query_string);
     _jdbc_param.table_type = _table_type;
 
+    get_parent()->_scanner_profile->add_info_string("JdbcDriverClass", 
_jdbc_param.driver_class);
+    get_parent()->_scanner_profile->add_info_string("JdbcDriverUrl", 
_jdbc_param.driver_path);
+    get_parent()->_scanner_profile->add_info_string("JdbcUrl", 
_jdbc_param.jdbc_url);
+    get_parent()->_scanner_profile->add_info_string("QuerySql", 
_jdbc_param.query_string);
+
     _jdbc_connector.reset(new (std::nothrow) JdbcConnector(_jdbc_param));
     if (_jdbc_connector == nullptr) {
         return Status::InternalError("new a jdbc scanner failed.");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to