Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCORE-2221 test to prove between node wrong behaviour over links #7940

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions test/test_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6559,4 +6559,30 @@ TEST(Parser_Wildcard)
CHECK_EQUAL(q.count(), 1);
}

ONLY(Test_Between_OverLinks)
{
Group g;
TableRef parent = g.add_table("Parent");
TableRef child = g.add_table("Child");

ColKey ck_child = parent->add_column(*child, "child");
ColKey ck_int = child->add_column(type_Int, "int");

for (size_t i = 0; i < 100; ++i) {
auto obj = child->create_object();
obj.set(ck_int, (int)i);
parent->create_object().set(ck_child, obj.get_key());
}

// this works is using a RelationalNode
auto q = parent->query("child.int < 50");
CHECK(q.count() == 50);

// this is not working with colkey not found and it using the
// in between node.
auto q1 = parent->query("child.int BETWEEN {0,100}");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently we are not following the links, when we do:

auto min_val = min->visit(drv, type_Int);
auto max_val = max->visit(drv, type_Int);
q.between(obj_prop->column_key(), min_val->get_mixed().get_int(), max_val->get_mixed().get_int());
return q;

CHECK(q1.count() == 100);
}


#endif // TEST_PARSER
Loading