-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'ad-freiburg/master' into refactor-resul…
…t-table
- Loading branch information
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Copyright 2018, University of Freiburg, | ||
// Chair of Algorithms and Data Structures. | ||
// Author: Florian Kramer ([email protected]) | ||
// Authors: Florian Kramer ([email protected]) | ||
// Johannes Kalmbach ([email protected]) | ||
|
||
#include <gmock/gmock.h> | ||
|
||
|
@@ -12,6 +13,7 @@ | |
#include "engine/GroupBy.h" | ||
#include "engine/IndexScan.h" | ||
#include "engine/Join.h" | ||
#include "engine/NeutralElementOperation.h" | ||
#include "engine/QueryPlanner.h" | ||
#include "engine/Sort.h" | ||
#include "engine/Values.h" | ||
|
@@ -1932,3 +1934,15 @@ TEST(GroupBy, AddedHavingRows) { | |
auto expected = makeIdTableFromVector({{i(0), i(3), Id::makeFromBool(true)}}); | ||
EXPECT_EQ(table, expected); | ||
} | ||
|
||
TEST(GroupBy, Descriptor) { | ||
// Group by with variables | ||
auto* qec = ad_utility::testing::getQec(); | ||
auto subtree = ad_utility::makeExecutionTree<ValuesForTesting>( | ||
qec, makeIdTableFromVector({{3}}), | ||
std::vector<std::optional<Variable>>{Variable{"?a"}}); | ||
GroupBy groupBy{qec, {Variable{"?a"}}, {}, subtree}; | ||
EXPECT_EQ(groupBy.getDescriptor(), "GroupBy on ?a"); | ||
GroupBy groupBy2{qec, {}, {}, subtree}; | ||
EXPECT_EQ(groupBy2.getDescriptor(), "GroupBy (implicit)"); | ||
} |