Skip to content

Commit 93ca57c

Browse files
committed
rework query id
1 parent 54704d5 commit 93ca57c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ydb/core/fq/libs/actors/pending_fetcher.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,16 @@ class TPendingFetcher : public NActors::TActorBootstrapped<TPendingFetcher> {
358358
const TString folderId = NYdb::NFq::TScope(task.scope()).ParseFolder();
359359
const TString cloudId = task.sensor_labels().at("cloud_id");
360360
const TString queryId = task.query_id().value();
361-
361+
const bool isStreaming = task.query_type() == FederatedQuery::QueryContent::STREAMING;
362362
TString queryIdLabel = queryId;
363363
if (task.automatic()) {
364-
queryIdLabel = (task.query_type() == FederatedQuery::QueryContent::STREAMING) ? "streaming" : "automatic";
364+
queryIdLabel = isStreaming ? "streaming" : "automatic";
365365
} else {
366-
if (task.query_type() == FederatedQuery::QueryContent::ANALYTICS) {
366+
if (!isStreaming) {
367367
queryIdLabel = "analytics";
368+
} else if (task.query_name()) {
369+
// todo: sanitize query name
370+
queryIdLabel = task.query_name();
368371
}
369372
}
370373

0 commit comments

Comments
 (0)