zhztheplayer commented on code in PR #8380:
URL: https://github.com/apache/incubator-gluten/pull/8380#discussion_r1921724994
##########
shims/common/src/main/scala/org/apache/gluten/config/GlutenConfig.scala:
##########
@@ -2288,4 +2294,48 @@ object GlutenConfig {
.doc("If enabled, gluten will not offload scan when encrypted parquet
files are detected")
.booleanConf
.createWithDefault(false)
+
+ val QUERY_TRACE_ENABLED =
buildConf("spark.gluten.sql.columnar.backend.velox.queryTraceEnabled")
+ .doc("Enable query tracing flag.")
+ .internal()
+ .booleanConf
+ .createWithDefault(false)
+
+ val QUERY_TRACE_DIR =
buildConf("spark.gluten.sql.columnar.backend.velox.queryTraceDir")
+ .doc("Base dir of a query to store tracing data.")
Review Comment:
What happens if one leaves this empty?
##########
docs/developers/QueryTrace.md:
##########
@@ -0,0 +1,175 @@
+---
+layout: page
+title: How To Use Gluten
+nav_order: 1
+parent: Developer Overview
+---
Review Comment:
@jinchengchenghh
nit: Would you update `title` (and perhaps other fields as well) in the
header? Thanks.
##########
cpp/velox/compute/WholeStageResultIterator.cc:
##########
@@ -51,6 +51,14 @@ const std::string kWriteIOTime = "writeIOTime";
// others
const std::string kHiveDefaultPartition = "__HIVE_DEFAULT_PARTITION__";
+std::string getQueryId(const std::unordered_map<std::string, std::string>&
confMap) {
+ auto it = confMap.find(kQueryTraceQueryId);
+ if (it != confMap.end()) {
+ return it->second;
+ }
+ return "";
+}
+
Review Comment:
> Can we uses the applicationId_stageId as the queryId?
Do we have applicationId passed through JNI? Or could just align it with the
[task
name](https://github.com/apache/incubator-gluten/blob/b29aa3b9973d28ed03e9840772734dd1f47b3cdd/cpp/velox/compute/WholeStageResultIterator.cc#L87-L91)
somehow.
--
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]