Skip to content

Commit

Permalink
Fix the cache key of DESCRIBE clauses that contain FROM statements.
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Kalmbach <[email protected]>
  • Loading branch information
joka921 committed Nov 21, 2024
1 parent 71a1de6 commit a0046e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/engine/Describe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ string Describe::getCacheKeyImpl() const {
&TripleComponent::toRdfLiteral);
std::ranges::sort(graphIdVec);
absl::StrAppend(&result,
"\nFiltered by Graphs:",
absl::StrJoin(graphIdVec, " "));
"\nFiltered by Graphs:", absl::StrJoin(graphIdVec, " "));
}
return result;
}
Expand Down
7 changes: 4 additions & 3 deletions test/engine/DescribeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ TEST(Describe, simpleMembers) {
EXPECT_FALSE(describe.knownEmptyResult());

using namespace ::testing;
EXPECT_THAT(describe.getCacheKey(),
AllOf(HasSubstr("DESCRIBE"), HasSubstr("<s>"),
Not(HasSubstr("<p>")), HasSubstr("Neutral Element"), Not(HasSubstr("Filtered"))));
EXPECT_THAT(
describe.getCacheKey(),
AllOf(HasSubstr("DESCRIBE"), HasSubstr("<s>"), Not(HasSubstr("<p>")),
HasSubstr("Neutral Element"), Not(HasSubstr("Filtered"))));
{
auto parsedDescribe2 = parsedDescribe;
parsedDescribe2.datasetClauses_.defaultGraphs_.emplace(
Expand Down

0 comments on commit a0046e4

Please sign in to comment.