Skip to content

Conversation

@joka921
Copy link
Member

@joka921 joka921 commented Aug 18, 2023

No description provided.

SEVERAL TODOS:
* Tests
* Corner case of negative start
* Prepare the infrastructure for several other string expressions.
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Patch coverage: 94.52% and project coverage change: +0.06% 🎉

Comparison is base (6dc996e) 78.26% compared to head (58b496e) 78.33%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1057      +/-   ##
==========================================
+ Coverage   78.26%   78.33%   +0.06%     
==========================================
  Files         275      276       +1     
  Lines       25678    25770      +92     
  Branches     3143     3154      +11     
==========================================
+ Hits        20098    20188      +90     
- Misses       4378     4379       +1     
- Partials     1202     1203       +1     
Files Changed Coverage Δ
src/global/ValueId.h 92.99% <ø> (ø)
src/parser/sparqlParser/SparqlQleverVisitor.h 100.00% <ø> (ø)
src/engine/sparqlExpressions/StringExpressions.cpp 94.04% <92.30%> (-5.96%) ⬇️
...c/engine/sparqlExpressions/SparqlExpressionTypes.h 79.03% <100.00%> (+1.44%) ⬆️
src/parser/sparqlParser/SparqlQleverVisitor.cpp 91.51% <100.00%> (+0.29%) ⬆️

... and 4 files with indirect coverage changes

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

Copy link
Member

@hannahbast hannahbast left a comment

Choose a reason for hiding this comment

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

This looks great, I only have a small question.

matchNaryWithChildrenMatchers(
&makeSubstrExpression, variableExpressionMatcher(V{"?x"}),
idExpressionMatcher(IntId(7)),
idExpressionMatcher(IntId(576460752303423487))));
Copy link
Member

Choose a reason for hiding this comment

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

Why can't this number be computed from constants in ValueId?

@hannahbast hannahbast changed the title Implement the SUBSTR expression. Implement the SUBSTR function Aug 18, 2023
@hannahbast
Copy link
Member

Suggestion for commit message:

First implementation of a non-trivial string function. SUBSTR is particularly challenging because it takes a string argument as well as numeric arguments and because the numeric arguments have default values and there are many non-trivial corner cases to consider for implementing the standard correctly.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@hannahbast hannahbast merged commit 8546185 into ad-freiburg:master Aug 21, 2023
@joka921 joka921 deleted the string-expressions branch August 21, 2023 10:32
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