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

Parse update queries #1354

Merged
merged 17 commits into from
Jun 5, 2024
Merged

Parse update queries #1354

merged 17 commits into from
Jun 5, 2024

Conversation

Qup42
Copy link
Member

@Qup42 Qup42 commented May 22, 2024

This commit extends SPARQL parser s.t. it can parse SPARQL UPDATE queries and store them as part of the ParsedQuery. The updates are not yet processed, but (as of now) still lead to an error message that updates are not yet supported.

Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 93.81443% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 88.82%. Comparing base (f9c3132) to head (9b2e737).

Current head 9b2e737 differs from pull request most recent head 600ac23

Please upload reports for the commit 600ac23 to get more accurate results.

Files Patch % Lines
src/parser/sparqlParser/SparqlQleverVisitor.cpp 93.75% 9 Missing and 2 partials ⚠️
src/parser/UpdateClause.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1354      +/-   ##
==========================================
+ Coverage   88.77%   88.82%   +0.05%     
==========================================
  Files         324      326       +2     
  Lines       28676    28850     +174     
  Branches     3172     3191      +19     
==========================================
+ Hits        25456    25627     +171     
  Misses       2067     2067              
- Partials     1153     1156       +3     

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

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.

This already looks very promising I am glad that you split this up, that increases the reviewability.

A first round of reviews:

  1. Comments by me
  2. Missing tests
  3. Suggestions by Sonarcloud (the should be const& for using Base::Base is a false positive/bug in the tool, but most of the others seem legit.

src/parser/UpdateClause.h Outdated Show resolved Hide resolved
src/parser/Triples.h Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.h Outdated Show resolved Hide resolved
test/SparqlAntlrParserTest.cpp Outdated Show resolved Hide resolved
test/SparqlAntlrParserTestHelpers.h Outdated Show resolved Hide resolved
src/parser/ParsedQuery.h Show resolved Hide resolved
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.

  1. Very small changes from your updated code
  2. Please add the missing unit tests (mostly for failing parser cases, so they should be easy)
  3. Please fix the low-hanging Sonarcloud issues

src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
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.

Two very minor comments, I will address them myself and then merge this.

src/parser/sparqlParser/SparqlQleverVisitor.cpp Outdated Show resolved Hide resolved
src/parser/sparqlParser/SparqlQleverVisitor.h Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Issues
8 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@joka921 joka921 merged commit a2ce6fa into ad-freiburg:master Jun 5, 2024
17 checks passed
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