File tree 2 files changed +5
-3
lines changed
ydb/public/lib/ydb_cli/common 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1581,11 +1581,12 @@ TPlanViewConfig::TPlanViewConfig() {
1581
1581
}
1582
1582
1583
1583
1584
- void TPlanVisualizer::LoadPlans (const TString& plans) {
1584
+ void TPlanVisualizer::LoadPlans (const TString& plans, bool simplified) {
1585
+ Config.Simplified = simplified;
1585
1586
NJson::TJsonReaderConfig jsonConfig;
1586
1587
NJson::TJsonValue jsonNode;
1587
1588
if (NJson::ReadJsonTree (plans, &jsonConfig, &jsonNode)) {
1588
- if (auto * topNode = jsonNode.GetValueByPath (" Plan" )) {
1589
+ if (auto * topNode = jsonNode.GetValueByPath (simplified ? " SimplifiedPlan " : " Plan" )) {
1589
1590
if (auto * subNode = topNode->GetValueByPath (" Plans" )) {
1590
1591
for (auto & plan : subNode->GetArray ()) {
1591
1592
if (auto * typeNode = plan.GetValueByPath (" Node Type" )) {
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ struct TPlanViewConfig {
183
183
ui32 SummaryWidth;
184
184
ui32 Width;
185
185
TColorPalette Palette;
186
+ bool Simplified = false ;
186
187
};
187
188
188
189
class TPlan {
@@ -250,7 +251,7 @@ class TPlanVisualizer {
250
251
251
252
public:
252
253
253
- void LoadPlans (const TString& plans);
254
+ void LoadPlans (const TString& plans, bool simplified = false );
254
255
void LoadPlan (const TString& planNodeType, const NJson::TJsonValue& root);
255
256
void PostProcessPlans ();
256
257
TString PrintSvg ();
You can’t perform that action at this time.
0 commit comments