liuneng1994 commented on code in PR #7801:
URL: https://github.com/apache/incubator-gluten/pull/7801#discussion_r1828928945


##########
cpp-ch/local-engine/Common/QueryContext.cpp:
##########
@@ -124,14 +126,24 @@ std::shared_ptr<DB::ThreadGroup> 
QueryContext::currentThreadGroup()
     throw Exception(ErrorCodes::LOGICAL_ERROR, "Thread group not found.");
 }
 
-void QueryContext::logCurrentPerformanceCounters(ProfileEvents::Counters & 
counters) const
+String QueryContext::currentTaskIdOrEmpty()
+{
+    if (auto thread_group = CurrentThread::getGroup())
+    {
+        const int64_t id = 
reinterpret_cast<int64_t>(CurrentThread::getGroup().get());
+        return query_map_.get(id)->task_id;
+    }
+   return "";
+}
+
+void QueryContext::logCurrentPerformanceCounters(ProfileEvents::Counters & 
counters, String task_id) const

Review Comment:
   ```suggestion
   void QueryContext::logCurrentPerformanceCounters(ProfileEvents::Counters & 
counters, const String& task_id) const
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to