diff --git a/arangod/Aql/IResearchViewNode.cpp b/arangod/Aql/IResearchViewNode.cpp index df22b644f2..cd2e0d81fa 100644 --- a/arangod/Aql/IResearchViewNode.cpp +++ b/arangod/Aql/IResearchViewNode.cpp @@ -673,7 +673,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_STORED_VALUES_VARS = "viewStoredValuesVars"; const char* NODE_VIEW_VALUES_VAR_COLUMN_NUMBER = "columnNumber"; const char* NODE_VIEW_VALUES_VAR_FIELD_NUMBER = "fieldNumber"; @@ -999,7 +999,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"); } ViewValuesVars viewValuesVars; for (auto const columnFieldsVars : velocypack::ArrayIterator(viewValuesVarsSlice)) { @@ -1007,7 +1007,7 @@ IResearchViewNode::IResearchViewNode(aql::ExecutionPlan& plan, velocypack::Slice auto const columnNumberSlice = columnFieldsVars.get(NODE_VIEW_VALUES_VAR_COLUMN_NUMBER); if (!columnNumberSlice.isNumber()) { THROW_ARANGO_EXCEPTION_FORMAT( - TRI_ERROR_BAD_PARAMETER, "\"ViewValuesVars[*].columnNumber\" %s should be a number", + TRI_ERROR_BAD_PARAMETER, "\"viewValuesVars[*].columnNumber\" %s should be a number", columnNumberSlice.toString().c_str()); } auto const columnNumber = columnNumberSlice.getNumber(); @@ -1015,7 +1015,7 @@ IResearchViewNode::IResearchViewNode(aql::ExecutionPlan& plan, velocypack::Slice if (!viewStoredValuesVarsSlice.isArray()) { THROW_ARANGO_EXCEPTION_MESSAGE( TRI_ERROR_BAD_PARAMETER, - "\"ViewValuesVars[*].viewStoredValuesVars\" attribute should be an array"); + "\"viewValuesVars[*].viewStoredValuesVars\" attribute should be an array"); } for (auto const fieldVar : velocypack::ArrayIterator(viewStoredValuesVarsSlice)) { extractViewValuesVar(vars, viewValuesVars, columnNumber, fieldVar); diff --git a/arangod/Aql/IndexNode.cpp b/arangod/Aql/IndexNode.cpp index 1d0e049e1c..1d99ee76f5 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::vector> 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_back(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& fieldVar : _outNonMaterializedIndVars.second) { VPackObjectBuilder objectScope(&builder); builder.add("fieldNumber", VPackValue(fieldVar.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()) + "\" }");