Skip to content

Allow writing materialized views during index build#2693

Open
ullingerc wants to merge 6 commits intoad-freiburg:masterfrom
ullingerc:matview-on-indexbuild
Open

Allow writing materialized views during index build#2693
ullingerc wants to merge 6 commits intoad-freiburg:masterfrom
ullingerc:matview-on-indexbuild

Conversation

@ullingerc
Copy link
Member

@ullingerc ullingerc commented Feb 3, 2026

This change adds the possibility to write materialized views during the index build procedure.

Using the qlever-index binary: Specify a JSON mapping from view name to view write queries (e.g. {"geometries": "PREFIX geo: <http://www.opengis.net/ont/geosparql#> SELECT * { ?s geo:hasGeometry ?m . ?m geo:asWKT ?g }"}) with the CLI argument --write-materialized-views.

Using libqlever: Set the writeMaterializedViews_ attribute of IndexBuilderConfig.

@ullingerc ullingerc changed the title Allow writing materialized views with qlever-index Allow writing materialized views during index build Feb 3, 2026
@ullingerc ullingerc marked this pull request as ready for review February 3, 2026 13:25
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.59%. Comparing base (cca3768) to head (de4425e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2693      +/-   ##
==========================================
- Coverage   91.60%   91.59%   -0.01%     
==========================================
  Files         483      483              
  Lines       41360    41368       +8     
  Branches     5493     5495       +2     
==========================================
+ Hits        37886    37892       +6     
  Misses       1897     1897              
- Partials     1577     1579       +2     

☔ 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.

@ullingerc ullingerc requested review from RobinTF and joka921 and removed request for RobinTF February 3, 2026 15:51
@sparql-conformance
Copy link

Overview

Number of Tests Passed ✅ Intended ✅ Failed ❌ Not tested
547 449 73 25 0

Conformance check failed ❌

Test Status Changes 📊

Number of Tests Previous Status Current Status
1 Passed Failed

Details: https://qlever.dev/sparql-conformance-ui?cur=de4425e5813b85a8f5c9b325bb90e30ed0fb43f3&prev=cca37689eb8be289bc51bcb675030d05dd10f671

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2026

Copy link
Collaborator

@RobinTF RobinTF left a comment

Choose a reason for hiding this comment

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

Looks good, just a minor suggestion

// Helper to convert the JSON given for writing materialized views to a proper
// `WriteMaterializedViews` vector.
qlever::IndexBuilderConfig::WriteMaterializedViews parseMaterializedViewsJson(
std::string materializedViewsJson) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think using const std::string& or std::string_view should be completely sufficient here, with no change in behaviour for the json parser.

config.inputFiles_ = getFileSpecifications(filetype, inputFile,
defaultGraphs, parseParallel);
config.writeMaterializedViews_ =
parseMaterializedViewsJson(std::move(materializedViewsJson));
Copy link
Collaborator

Choose a reason for hiding this comment

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

In case you apply my suggestion, you don't need to move here.

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