Skip to content

Conversation

@RobinTF
Copy link
Collaborator

@RobinTF RobinTF commented Jan 12, 2026

This is a preparation PR for #2408. It implements a function that allows to recompute statistics.
This is currently not used to correct outdated information (though ideally it should be), but that is a potential option for the future.

@RobinTF RobinTF requested a review from joka921 January 12, 2026 18:36
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.54%. Comparing base (7ec91f8) to head (5384779).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2640      +/-   ##
==========================================
+ Coverage   91.52%   91.54%   +0.02%     
==========================================
  Files         479      480       +1     
  Lines       41177    41259      +82     
  Branches     5474     5483       +9     
==========================================
+ Hits        37688    37772      +84     
+ Misses       1910     1909       -1     
+ Partials     1579     1578       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Mostly small comments, but I have a serious question about blank nodes.

Comment on lines +1861 to +1863
if (id.getDatatype() == Datatype::BlankNodeIndex) {
nextBlankNode =
std::max(nextBlankNode, id.getBlankNodeIndex().get() + 1);
Copy link
Member

Choose a reason for hiding this comment

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

I think this doesn't work if you in the located triples have randomly allocated blank nodes, as you will have a really large maximum. There is a precondition, that those blank nodes from the main index are dense. Let's discuss this subtlety.

// queries the statistics which are never updated. Consider calling
// `IndexImpl::recomputeStatistics` and storing the result somewhere in this
// case. It also doesn't return the correct result for internal
// permutations.
Copy link
Member

Choose a reason for hiding this comment

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

Don't we have functions in the CompressedRelation that correctly computes distinct bla (currently i think col1, but maybe we can extend this? And then we can only use this expensive computation if there are any updates at all. At least extend the comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, and these are also used by group by (but obviously they take longer to compute than just reading the stats)

@ad-freiburg ad-freiburg deleted a comment from joka921 Jan 14, 2026
@sparql-conformance
Copy link

Overview

Number of Tests Passed ✅ Intended ✅ Failed ❌ Not tested
547 450 73 24 0

Conformance check passed ✅

No test result changes.

Details: https://qlever.dev/sparql-conformance-ui?cur=5384779322b617eefd5d2c188b9251b7ff7a97ec&prev=7ec91f836cb8c98b4e07c906574cb4bf7f6f4e02

@sonarqubecloud
Copy link

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Only a very small additional comment:)

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

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

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants