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

Conversation

nicola-cab
Copy link
Member

@nicola-cab nicola-cab commented Aug 1, 2024

What, How & Why?

In Between node fix follow links.
Note: needs a changelog

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed
  • bindgen/spec.yml, if public C++ API changed

@cla-bot cla-bot bot added the cla: yes label Aug 1, 2024
@nicola-cab nicola-cab requested a review from ironage August 1, 2024 14:20
@nicola-cab nicola-cab removed the request for review from ironage August 1, 2024 14:22

// 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;

const auto type = tmp->get_type();
if (type == type_Int || type == type_Timestamp) {
if (obj_prop->links_exist()) {
const auto& link_map = obj_prop->get_link_map();
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure if this is enough, and it is covering all the cases, but it seems like it is enough to pass all core tests, we basically need to use the target table if the query is run over links. @ironage @jedelbo

Copy link
Contributor

@ironage ironage Aug 7, 2024

Choose a reason for hiding this comment

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

This approach doesn't work because you are passing the destination column and the destination table, without accounting for the links along the way. The specialized between node doesn't handle links, so we can just fall back to a normal relational comparison below. I have opened #7965 to do it this way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok great! Probably we should have a test in core that tracks this, because if something is not working, some test should tell us!!! But again, thanks for spotting this.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is a test in #7965 which will catch this.

@nicola-cab nicola-cab requested a review from ironage August 1, 2024 21:50
Copy link

Pull Request Test Coverage Report for Build nicola.cabiddu_1886

Details

  • 34 of 34 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on nc/test_for_RCORE-2221 at 91.076%

Totals Coverage Status
Change from base Build 2537: 91.1%
Covered Lines: 216781
Relevant Lines: 238021

💛 - Coveralls

@nicola-cab nicola-cab closed this Aug 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants