Skip to content

Commit

Permalink
Log query for opt error
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Dec 7, 2022
1 parent f76950a commit 3cfa598
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graph/service/QueryInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ 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: " << status.message();
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");
Expand Down

0 comments on commit 3cfa598

Please sign in to comment.