From b0f42bf57424b9b83c80ac8e916275deeefe55d7 Mon Sep 17 00:00:00 2001 From: "jie.wang" <38901892+jievince@users.noreply.github.com> Date: Wed, 28 Dec 2022 15:43:33 +0800 Subject: [PATCH] update error msg of optimizer (#5133) Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com> --- src/graph/service/QueryInstance.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/graph/service/QueryInstance.cpp b/src/graph/service/QueryInstance.cpp index 45d0ef02e88..d878a49f4e9 100644 --- a/src/graph/service/QueryInstance.cpp +++ b/src/graph/service/QueryInstance.cpp @@ -93,11 +93,9 @@ Status QueryInstance::validateAndOptimize() { // Optimize the query, and get the execution plan. We should not pass the optimizer errors to user // since the message is often not easy to understand. Logging them is enough. if (auto status = findBestPlan(); !status.ok()) { - LOG(ERROR) << "Error found in optimization stage for query: " << rctx->query() - << ", error: " << status.message(); - return Status::Error( - "There are some errors found in optimizer, " - "please contact to the admin to learn more details"); + return Status::Error("Error found in optimization stage for query: %s, error: %s", + rctx->query().c_str(), + status.message().c_str()); } stats::StatsManager::addValue(kOptimizerLatencyUs, *(qctx_->plan()->optimizeTimeInUs())); if (FLAGS_enable_space_level_metrics && spaceName != "") {