aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Velikhov <pavelvelikhov@ydb.tech>2024-01-24 17:46:59 +0300
committerGitHub <noreply@github.com>2024-01-24 17:46:59 +0300
commite6a4bbfce1c5640eaa06dc6fb2dc0cacc351f9b8 (patch)
tree179e0dc8554df0a4bedb992e2dc8c7bd295aba86
parent2c4801be364ef368e1f9d1013a3971b9e31432dd (diff)
downloadydb-e6a4bbfce1c5640eaa06dc6fb2dc0cacc351f9b8.tar.gz
Fixed a minor bug in simplified plan JSON generation (#1257)
* Fixed a minor bug in simplied JSON generation * Update ydb/public/lib/ydb_cli/common/format.cpp Co-authored-by: Iuliia Sidorina <yulia@ydb.tech> --------- Co-authored-by: Iuliia Sidorina <yulia@ydb.tech>
-rw-r--r--ydb/public/lib/ydb_cli/common/format.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/ydb/public/lib/ydb_cli/common/format.cpp b/ydb/public/lib/ydb_cli/common/format.cpp
index dc8f37c59d8..63121dab5a2 100644
--- a/ydb/public/lib/ydb_cli/common/format.cpp
+++ b/ydb/public/lib/ydb_cli/common/format.cpp
@@ -610,6 +610,21 @@ NJson::TJsonValue TQueryPlanPrinter::ReconstructQueryPlanRec(const NJson::TJsonV
return result;
}
+ if (plan.GetMapSafe().at("Node Type") == "TableLookup") {
+ NJson::TJsonValue newOps;
+ NJson::TJsonValue op;
+
+ op["Name"] = "TableLookup";
+ op["Columns"] = plan.GetMapSafe().at("Columns");
+ op["LookupKeyColumns"] = plan.GetMapSafe().at("LookupKeyColumns");
+ op["Table"] = plan.GetMapSafe().at("Table");
+
+ newOps.AppendValue(op);
+
+ result["Operators"] = newOps;
+ return result;
+ }
+
for (auto p : plan.GetMapSafe().at("Plans").GetArraySafe()) {
if (p.GetMapSafe().at("Node Type").GetStringSafe().find("Precompute") == TString::npos) {
planInputs.AppendValue(ReconstructQueryPlanRec(p, 0, planIndex, precomputes, nodeCounter));