diff --git a/arangod/Aql/IResearchViewNode.cpp b/arangod/Aql/IResearchViewNode.cpp index 136257eac0..1a7e0f86aa 100644 --- a/arangod/Aql/IResearchViewNode.cpp +++ b/arangod/Aql/IResearchViewNode.cpp @@ -663,7 +663,7 @@ const char* NODE_OPTIONS_PARAM = "options"; const char* NODE_VOLATILITY_PARAM = "volatility"; const char* NODE_PRIMARY_SORT_PARAM = "primarySort"; const char* NODE_PRIMARY_SORT_BUCKETS_PARAM = "primarySortBuckets"; -const char* NODE_VIEW_VALUES_VARS = "ViewValuesVars"; +const char* NODE_VIEW_VALUES_VARS = "viewValuesVars"; const char* NODE_VIEW_VALUES_VAR_FIELD_NUMBER = "fieldNumber"; const char* NODE_VIEW_VALUES_VAR_ID = "id"; const char* NODE_VIEW_VALUES_VAR_NAME = "name"; @@ -924,7 +924,7 @@ IResearchViewNode::IResearchViewNode(aql::ExecutionPlan& plan, velocypack::Slice auto const viewValuesVarsSlice = base.get(NODE_VIEW_VALUES_VARS); if (!viewValuesVarsSlice.isArray()) { THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, - "\"ViewValuesVars\" attribute should be an array"); + "\"viewValuesVars\" attribute should be an array"); } std::unordered_map viewValuesVars; viewValuesVars.reserve(viewValuesVarsSlice.length()); @@ -932,7 +932,7 @@ IResearchViewNode::IResearchViewNode(aql::ExecutionPlan& plan, velocypack::Slice auto const fieldNumberSlice = indVar.get(NODE_VIEW_VALUES_VAR_FIELD_NUMBER); if (!fieldNumberSlice.isNumber()) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"ViewValuesVars[*].fieldNumber\" %s should be a number", + TRI_ERROR_BAD_PARAMETER, "\"viewValuesVars[*].fieldNumber\" %s should be a number", fieldNumberSlice.toString().c_str()); } auto const fieldNumber = fieldNumberSlice.getNumber(); @@ -940,7 +940,7 @@ IResearchViewNode::IResearchViewNode(aql::ExecutionPlan& plan, velocypack::Slice auto const varIdSlice = indVar.get(NODE_VIEW_VALUES_VAR_ID); if (!varIdSlice.isNumber()) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"ViewValuesVars[*].id\" variable id %s should be a number", + TRI_ERROR_BAD_PARAMETER, "\"viewValuesVars[*].id\" variable id %s should be a number", varIdSlice.toString().c_str()); } @@ -949,7 +949,7 @@ IResearchViewNode::IResearchViewNode(aql::ExecutionPlan& plan, velocypack::Slice if (!var) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"ViewValuesVars[*].id\" unable to find variable by id %d", + TRI_ERROR_BAD_PARAMETER, "\"viewValuesVars[*].id\" unable to find variable by id %d", varId); } viewValuesVars.emplace(fieldNumber, var); diff --git a/arangod/Aql/IndexNode.cpp b/arangod/Aql/IndexNode.cpp index 727de84934..54111700d6 100644 --- a/arangod/Aql/IndexNode.cpp +++ b/arangod/Aql/IndexNode.cpp @@ -130,10 +130,10 @@ IndexNode::IndexNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& bas auto const indexId = indexIdSlice.getNumber(); - auto const indexValuesVarsSlice = base.get("IndexValuesVars"); + auto const indexValuesVarsSlice = base.get("indexValuesVars"); if (!indexValuesVarsSlice.isArray()) { THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, - "\"IndexValuesVars\" attribute should be an array"); + "\"indexValuesVars\" attribute should be an array"); } std::unordered_map indexValuesVars; indexValuesVars.reserve(indexValuesVarsSlice.length()); @@ -141,7 +141,7 @@ IndexNode::IndexNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& bas auto const fieldNumberSlice = indVar.get("fieldNumber"); if (!fieldNumberSlice.isNumber()) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"IndexValuesVars[*].fieldNumber\" %s should be a number", + TRI_ERROR_BAD_PARAMETER, "\"indexValuesVars[*].fieldNumber\" %s should be a number", fieldNumberSlice.toString().c_str()); } auto const fieldNumber = fieldNumberSlice.getNumber(); @@ -149,7 +149,7 @@ IndexNode::IndexNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& bas auto const varIdSlice = indVar.get("id"); if (!varIdSlice.isNumber()) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"IndexValuesVars[*].id\" variable id %s should be a number", + TRI_ERROR_BAD_PARAMETER, "\"indexValuesVars[*].id\" variable id %s should be a number", varIdSlice.toString().c_str()); } @@ -158,7 +158,7 @@ IndexNode::IndexNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& bas if (!var) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"IndexValuesVars[*].id\" unable to find variable by id %d", + TRI_ERROR_BAD_PARAMETER, "\"indexValuesVars[*].id\" unable to find variable by id %d", varId); } indexValuesVars.emplace(fieldNumber, var); @@ -294,7 +294,7 @@ void IndexNode::toVelocyPackHelper(VPackBuilder& builder, unsigned flags, }); TRI_ASSERT(indIt != _indexes.cend()); auto const& fields = (*indIt)->fields(); - VPackArrayBuilder arrayScope(&builder, "IndexValuesVars"); + VPackArrayBuilder arrayScope(&builder, "indexValuesVars"); for (auto const& indVar : _outNonMaterializedIndVars.second) { VPackObjectBuilder objectScope(&builder); builder.add("fieldNumber", VPackValue(indVar.first)); diff --git a/tests/Aql/IndexNodeTest.cpp b/tests/Aql/IndexNodeTest.cpp index 3e5447b395..c329e247cc 100644 --- a/tests/Aql/IndexNodeTest.cpp +++ b/tests/Aql/IndexNodeTest.cpp @@ -281,7 +281,7 @@ TEST_F(IndexNodeTest, constructIndexNode) { // correct json auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : 2," " \"id\" : 6," @@ -553,7 +553,7 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : 2," " \"id\" : 6," @@ -596,11 +596,11 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { ASSERT_TRUE(indNode.isLateMaterialized()); } - // incorrect IndexValuesVars + // incorrect indexValuesVars { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : {" + " \"indexValuesVars\" : {" " \"fieldNumber\" : 2," " \"id\" : 6," " \"name\" : \"5\"" @@ -651,7 +651,7 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : \"two\"," " \"id\" : 6," @@ -704,7 +704,7 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : 2," " \"id\" : \"six\"," @@ -757,7 +757,7 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : 2," " \"id\" : 6," @@ -803,7 +803,7 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : 2," " \"id\" : 6," @@ -856,7 +856,7 @@ TEST_F(IndexNodeTest, invalidLateMaterializedJSON) { { auto createJson = arangodb::velocypack::Parser::fromJson( "{" - " \"IndexValuesVars\" : [" + " \"indexValuesVars\" : [" " {" " \"fieldNumber\" : 2," " \"id\" : 6," diff --git a/tests/IResearch/IResearchViewNode-test.cpp b/tests/IResearch/IResearchViewNode-test.cpp index eb02b67271..6ea29f2e65 100644 --- a/tests/IResearch/IResearchViewNode-test.cpp +++ b/tests/IResearch/IResearchViewNode-test.cpp @@ -897,7 +897,7 @@ TEST_F(IResearchViewNodeTest, constructFromVPackSingleServer) { "\"varsUsedLater\":[], \"varsValid\":[], \"outVariable\": { " "\"name\":\"variable\", \"id\":0 }, \"outNmColPtr\": { \"name\":\"variable100\", \"id\":100 }, " "\"outNmDocId\": { \"name\":\"variable100\", \"id\":100 }, " - "\"ViewValuesVars\":{\"fieldNumber\":0, \"id\":101}, " + "\"viewValuesVars\":{\"fieldNumber\":0, \"id\":101}, " "\"options\": { \"waitForSync\" : " "true, \"collection\":null }, \"viewId\": \"" + std::to_string(logicalView->id()) + "\" }"); @@ -920,7 +920,7 @@ TEST_F(IResearchViewNodeTest, constructFromVPackSingleServer) { "\"varsUsedLater\":[], \"varsValid\":[], \"outVariable\": { " "\"name\":\"variable\", \"id\":0 }, \"outNmColPtr\": { \"name\":\"variable100\", \"id\":100 }, " "\"outNmDocId\": { \"name\":\"variable100\", \"id\":100 }, " - "\"ViewValuesVars\":[{\"fieldNumber\":\"0\", \"id\":101}], " + "\"viewValuesVars\":[{\"fieldNumber\":\"0\", \"id\":101}], " "\"options\": { \"waitForSync\" : " "true, \"collection\":null }, \"viewId\": \"" + std::to_string(logicalView->id()) + "\" }"); @@ -943,7 +943,7 @@ TEST_F(IResearchViewNodeTest, constructFromVPackSingleServer) { "\"varsUsedLater\":[], \"varsValid\":[], \"outVariable\": { " "\"name\":\"variable\", \"id\":0 }, \"outNmColPtr\": { \"name\":\"variable100\", \"id\":100 }, " "\"outNmDocId\": { \"name\":\"variable100\", \"id\":100 }, " - "\"ViewValuesVars\":[{\"fieldNumber\":0, \"id\":\"101\"}], " + "\"viewValuesVars\":[{\"fieldNumber\":0, \"id\":\"101\"}], " "\"options\": { \"waitForSync\" : " "true, \"collection\":null }, \"viewId\": \"" + std::to_string(logicalView->id()) + "\" }");