mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into feature/issue-#653-part2
This commit is contained in:
commit
607cc30ba7
|
@ -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<size_t>()) {
|
||||
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<int>();
|
||||
|
@ -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);
|
||||
|
|
|
@ -130,10 +130,10 @@ IndexNode::IndexNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& bas
|
|||
|
||||
auto const indexId = indexIdSlice.getNumber<TRI_idx_iid_t>();
|
||||
|
||||
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<std::pair<size_t, Variable const*>> 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<size_t>()) {
|
||||
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<size_t>();
|
||||
|
@ -149,7 +149,7 @@ IndexNode::IndexNode(ExecutionPlan* plan, arangodb::velocypack::Slice const& bas
|
|||
auto const varIdSlice = indVar.get("id");
|
||||
if (!varIdSlice.isNumber<aql::VariableId>()) {
|
||||
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));
|
||||
|
|
|
@ -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,"
|
||||
|
|
|
@ -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()) + "\" }");
|
||||
|
|
Loading…
Reference in New Issue