Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate single JSON with all types of plans in the server #1606

Merged
merged 10 commits into from
Feb 7, 2024
Prev Previous commit
Next Next commit
Simplifying a copy of the plan now
  • Loading branch information
pavelvelikhov committed Feb 6, 2024
commit e3fe7b91b4b1342d4d49845b91cdddc2ee7cd30e
6 changes: 4 additions & 2 deletions ydb/core/kqp/opt/kqp_query_plan.cpp
Original file line number Diff line number Diff line change
@@ -2003,12 +2003,14 @@ TString AddSimplifiedPlan(const TString& planText, bool analyzeMode) {
Y_UNUSED(analyzeMode);
NJson::TJsonValue planJson;
NJson::ReadJsonTree(planText, &planJson, true);

if (!planJson.GetMapSafe().contains("Plan")){
return planText;
}

planJson["SimplifiedPlan"] = SimplifyQueryPlan(planJson.GetMapSafe().at("Plan"));
NJson::TJsonValue planCopy;
NJson::ReadJsonTree(planText, &planCopy, true);

planJson["SimplifiedPlan"] = SimplifyQueryPlan(planCopy.GetMapSafe().at("Plan"));

// Don't print the OLAP plan yet, there are some non UTF-8 symbols there that need to be fixed
//TTempBufOutput stringStream;
Loading