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

Correct datatypes for string expressions #1636

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

DuDaAG
Copy link
Contributor

@DuDaAG DuDaAG commented Nov 22, 2024

Ich weiß leider immer noch nicht, wie ich ich zum Testen ein Literal mit Datatype erzeugen kann.

Also in Zeile ExportExecutionTreesTest.cpp Zeile 1678 + Zeile 1686.

Gibt es hier in Github die Möglichkeit, dass ich zu einzelnen Codestellen Kommentare (Fragen an dich) einfüge, damit es übersichtlicher ist. Ich habe die Funktion nur in den einzelnen Commits gefunden, aber bis man die dann findet. Also wie mache ich es am besten?

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 77.55102% with 33 lines in your changes missing coverage. Please review.

Project coverage is 89.57%. Comparing base (6fba76f) to head (0c41603).
Report is 36 commits behind head on master.

Files with missing lines Patch % Lines
...sparqlExpressions/SparqlExpressionValueGetters.cpp 28.57% 10 Missing ⚠️
src/engine/ExportQueryExecutionTrees.cpp 83.92% 3 Missing and 6 partials ⚠️
src/engine/sparqlExpressions/StringExpressions.cpp 83.67% 7 Missing and 1 partial ⚠️
...e/sparqlExpressions/SparqlExpressionValueGetters.h 33.33% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1636      +/-   ##
==========================================
+ Coverage   89.25%   89.57%   +0.32%     
==========================================
  Files         372      383      +11     
  Lines       34818    37023    +2205     
  Branches     3931     4186     +255     
==========================================
+ Hits        31076    33165    +2089     
- Misses       2470     2547      +77     
- Partials     1272     1311      +39     

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

@joka921
Copy link
Member

joka921 commented Nov 22, 2024

Hi, You can above click at Files changed, then you get the changed files (by default from all commits, which is fine for what you want), then you can select rows and attach comments to those. Make sure to finish your(self-review) if the comments are marked as "pending", because otherwise we cannot see them.

test/ExportQueryExecutionTreesTest.cpp Outdated Show resolved Hide resolved
test/ExportQueryExecutionTreesTest.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.

A first round on everything but the tests.
Work on my comments, and contact me once you are done or are left with questions.

src/engine/ExportQueryExecutionTrees.h Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.h Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.h Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.cpp Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.cpp Outdated Show resolved Hide resolved
src/engine/sparqlExpressions/StringExpressions.cpp Outdated Show resolved Hide resolved
src/engine/sparqlExpressions/StringExpressions.cpp Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
6.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

Another round of reviews, this is really improving.
Make sure that the continuous integration runs through (in particular no warnings in the code + formatting etc.)

src/parser/LiteralOrIri.cpp Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.h Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.h Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.h Outdated Show resolved Hide resolved
src/engine/ExportQueryExecutionTrees.cpp Outdated Show resolved Hide resolved
src/parser/Literal.cpp Show resolved Hide resolved
test/ExportQueryExecutionTreesTest.cpp Show resolved Hide resolved
Comment on lines 1655 to 1657
EXPECT_EQ(resultLiteral.value().toStringRepresentation(), "\"something\"");
// Case onlyReturnLiterals
resultLiteral = ExportQueryExecutionTrees::idToLiteralOrIri<true>(
Copy link
Member

Choose a reason for hiding this comment

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

There is a lot of code duplication here.
As a first step you can factor out the calls to idToLiteralOrIri (write a lambda that does this for you, such that the calls get shorter.

Then you can look up the gtest matchers ::testing::Optional and ::testing::ResultOf to get this shorter (the googletest documentation, or the rest of the codebase can give you hints, otherwise contact me.

test/SparqlExpressionTest.cpp Outdated Show resolved Hide resolved
test/SparqlExpressionTest.cpp Outdated Show resolved Hide resolved
@sparql-conformance
Copy link

Conformance check passed ✅

Test Status Changes 📊

Number of Tests Previous Status Current Status
2 Failed Intended

Details: https://qlever.cs.uni-freiburg.de/sparql-conformance-ui?cur=be80b0904533d081d33908944fafdfabef7c3eb0&prev=4a159948af0b56472898e34392754141c68e07cf

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