diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/include/document_type.h b/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/include/document_type.h index 69c95c0e637b47f378efc0881e47d639defda979..ff525ecbd6d13eab66edd89a2ce53c3b81cc3286 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/include/document_type.h +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/include/document_type.h @@ -24,7 +24,7 @@ namespace DocumentDB { struct QueryContext { std::string collectionName; std::string filter; - std::vector> path; + std::vector> projectionPath; ProjectionTree projectionTree; bool ifShowId = false; bool viewType = false; diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/include/result_set.h b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/include/result_set.h index aa2cbb322b8eaeb0cad2eadda202a67b2ac2584c..65956e090968ca6d263ae318ec4f3c6d499ce1dc 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/include/result_set.h +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/include/result_set.h @@ -44,7 +44,6 @@ private: int GetNextWithField(); DocumentStore *store_ = nullptr; - ValueObject key_; bool ifField_ = false; size_t index_ = 0; std::shared_ptr context_; diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/document_store.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/document_store.cpp index d6fe293577da390324cf84204e021b64fae8516c..fc4151a1e651abe2723126e1f1ad79a6f0409644 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/document_store.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/document_store.cpp @@ -640,7 +640,7 @@ int FindProjectionInit(const std::string &projection, std::shared_ptrpath = std::move(allPath); + context->projectionPath = std::move(allPath); context->viewType = viewType; return errCode; } diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp index bfba1da5c14de77cb7f641e3fa91c7c87accd4bc..5dc1741a6e7e21b3a8504aa0e2e1c81dd2cf67a8 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp @@ -223,14 +223,14 @@ int ResultSet::CutJsonBranch(std::string &jsonData) GLOGE("The node in CheckCutNode is nullptr"); return errCode; } - for (const auto & singleCutPaht : allCutPath) { + for (const auto &singleCutPaht : allCutPath) { if (!context_->ifShowId || singleCutPaht[0] != KEY_ID) { cjsonObj.DeleteItemDeeplyOnTarget(singleCutPaht); } } } if (!context_->viewType) { - for (const auto & singleCutPaht : context_->path) { // projection Path + for (const auto &singleCutPaht : context_->projectionPath) { cjsonObj.DeleteItemDeeplyOnTarget(singleCutPaht); } if (!context_->ifShowId) { diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp index 74b41d0a36ae9538b6bd7b84fc6568503aa3f6ac..e0b9bc242fe5913472ddf5b1e6b2ba7d2e54cac4 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp @@ -26,7 +26,7 @@ class ValueObject; int InitResultSet(std::shared_ptr &context, DocumentStore *store, ResultSet &resultSet, bool ifField) { if (ifField == false) { - if (context->projectionTree.ParseTree(context->path) == -E_INVALID_ARGS) { + if (context->projectionTree.ParseTree(context->projectionPath) == -E_INVALID_ARGS) { GLOGE("Parse ProjectionTree failed"); return -E_INVALID_ARGS; }