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

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


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 0f3f424038 [Enhencement](Profile) add profile info for jdbc scanner 
#18569 (#18579)
0f3f424038 is described below

commit 0f3f42403836a1b9e783217ab294e134b2773211
Author: Tiewei Fang <43782773+bepppo...@users.noreply.github.com>
AuthorDate: Wed Apr 12 14:32:19 2023 +0800

    [Enhencement](Profile) add profile info for jdbc scanner #18569 (#18579)
---
 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 87012274f4..db6cf0506f 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>
@@ -217,6 +218,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);
     _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