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

Spatial join area #1713

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c7a1ea8
untested changes
Jonathan24680 Dec 17, 2024
a266201
continued development
Jonathan24680 Dec 18, 2024
2cc8504
added all areas to the dataset and some tests
Jonathan24680 Dec 23, 2024
d784513
make file_buffer_size in the test index be a parameter
Jonathan24680 Dec 28, 2024
f6e1647
bugfix area dataset
Jonathan24680 Dec 28, 2024
1a4ff8f
backup commit
Jonathan24680 Dec 30, 2024
e3a2644
area test with points and areas working
Jonathan24680 Dec 31, 2024
f38cb1d
moved some stuff from dev space into the project
Jonathan24680 Jan 2, 2025
4d71c4e
new tests
Jonathan24680 Jan 4, 2025
38c9585
first test works now for the areas as well
Jonathan24680 Jan 11, 2025
ddea6d3
all tests are now executed and passed
Jonathan24680 Jan 12, 2025
1902d44
clang format
Jonathan24680 Jan 12, 2025
31e7054
merge master
Jonathan24680 Jan 12, 2025
cba4324
backup with removed filebuffersize compiling but not testing
Jonathan24680 Jan 17, 2025
d5c934c
make buffer size of test index variable
Jonathan24680 Jan 17, 2025
c1dc963
clean up code
Jonathan24680 Jan 17, 2025
c5284ef
sonarqube
Jonathan24680 Jan 20, 2025
fc1a1fe
correct bug for function without inline in header file
Jonathan24680 Jan 21, 2025
ec75e89
arbitrary geometry types and areas dont need to be approximated as po…
Jonathan24680 Jan 25, 2025
4fd698c
PR feedback
Jonathan24680 Jan 31, 2025
173e646
PR feedback
Jonathan24680 Jan 31, 2025
7dd8156
backup
Jonathan24680 Feb 1, 2025
1c60bf9
PR feedback
Jonathan24680 Feb 1, 2025
3b8ea1a
spelling mistake
Jonathan24680 Feb 1, 2025
a121ef2
Sonarqube issues
Jonathan24680 Feb 4, 2025
1168f32
PR changes
Jonathan24680 Feb 4, 2025
ca7f08e
PR changes
Jonathan24680 Feb 4, 2025
9d2956e
PR changes
Jonathan24680 Feb 4, 2025
14032bd
PR changes
Jonathan24680 Feb 4, 2025
29171b5
Sonarqube issues
Jonathan24680 Feb 4, 2025
457f8d4
format check
Jonathan24680 Feb 4, 2025
bf886c4
backup
Jonathan24680 Feb 7, 2025
10bdf7b
strange bug
Jonathan24680 Feb 7, 2025
5f12f22
solved strange bug
Jonathan24680 Feb 7, 2025
978b512
PR feedback
Jonathan24680 Feb 7, 2025
4132701
Sonarqube issue
Jonathan24680 Feb 7, 2025
d711586
Merge branch 'master' into SpatialJoinArea
Jonathan24680 Feb 7, 2025
f3c5b01
consistent naming of QueryBox and BoundingBox
Jonathan24680 Feb 8, 2025
a46fccd
add test for distance between GeoPoints and Areas
Jonathan24680 Feb 8, 2025
2cc0fef
improve true area distance calculation
Jonathan24680 Feb 8, 2025
96a903a
backup
Jonathan24680 Feb 10, 2025
47ba454
backup
Jonathan24680 Feb 10, 2025
61c6b98
PR changes
Jonathan24680 Feb 10, 2025
c0bf282
clang format
Jonathan24680 Feb 10, 2025
988ba8d
Sonarqube issus and bugfix
Jonathan24680 Feb 12, 2025
e42d9d0
format check
Jonathan24680 Feb 12, 2025
5b88f47
Merge branch 'master' into SpatialJoinArea
Jonathan24680 Feb 14, 2025
5a99080
Sonarqube issue remove unused operator
Jonathan24680 Feb 14, 2025
a7f4695
PR feedback
Jonathan24680 Feb 15, 2025
e5121f6
suggested parentheses around and condition
Jonathan24680 Feb 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
backup with removed filebuffersize compiling but not testing
  • Loading branch information
Jonathan24680 committed Jan 17, 2025
commit cba4324837ac309162e2cef8580ad70e01ceeb75
2 changes: 1 addition & 1 deletion test/engine/SpatialJoinTestHelpers.h
Original file line number Diff line number Diff line change
@@ -298,7 +298,7 @@ inline QueryExecutionContext* buildTestQEC(bool useAreas = false) {
ad_utility::MemorySize blocksizePermutations = 16_MB;
auto qec =
ad_utility::testing::getQec(kg, true, true, false, blocksizePermutations,
false, true, std::nullopt, 10000);
false, true, std::nullopt);
return qec;
}

10 changes: 3 additions & 7 deletions test/util/IndexTestHelpers.cpp
Original file line number Diff line number Diff line change
@@ -142,8 +142,7 @@ Index makeTestIndex(const std::string& indexBasename,
ad_utility::MemorySize blocksizePermutations,
bool createTextIndex, bool addWordsFromLiterals,
std::optional<std::pair<std::string, std::string>>
contentsOfWordsFileAndDocsFile,
unsigned long FILE_BUFFER_SIZE_) {
contentsOfWordsFileAndDocsFile) {
// Ignore the (irrelevant) log output of the index building and loading during
// these tests.
static std::ostringstream ignoreLogStream;
@@ -157,7 +156,6 @@ Index makeTestIndex(const std::string& indexBasename,
"\"zz\"@en . <zz> <label> <zz>";
}

FILE_BUFFER_SIZE = FILE_BUFFER_SIZE_;
BUFFER_SIZE_JOIN_PATTERNS_WITH_OSP = 2;
{
std::fstream f(inputFilename, std::ios_base::out);
@@ -249,8 +247,7 @@ QueryExecutionContext* getQec(std::optional<std::string> turtleInput,
ad_utility::MemorySize blocksizePermutations,
bool createTextIndex, bool addWordsFromLiterals,
std::optional<std::pair<std::string, std::string>>
contentsOfWordsFileAndDocsFile,
unsigned long FILE_BUFFER_SIZE_) {
contentsOfWordsFileAndDocsFile) {
// Similar to `absl::Cleanup`. Calls the `callback_` in the destructor, but
// the callback is stored as a `std::function`, which allows to store
// different types of callbacks in the same wrapper type.
@@ -310,8 +307,7 @@ QueryExecutionContext* getQec(std::optional<std::string> turtleInput,
testIndexBasename, turtleInput, loadAllPermutations,
usePatterns, usePrefixCompression,
blocksizePermutations, createTextIndex,
addWordsFromLiterals, contentsOfWordsFileAndDocsFile,
FILE_BUFFER_SIZE_ = FILE_BUFFER_SIZE_)),
addWordsFromLiterals, contentsOfWordsFileAndDocsFile)),
std::make_unique<QueryResultCache>()});
}
auto* qec = contextMap.at(key).qec_.get();
6 changes: 2 additions & 4 deletions test/util/IndexTestHelpers.h
Original file line number Diff line number Diff line change
@@ -47,8 +47,7 @@ Index makeTestIndex(const std::string& indexBasename,
bool createTextIndex = false,
bool addWordsFromLiterals = true,
std::optional<std::pair<std::string, std::string>>
contentsOfWordsFileAndDocsfile = std::nullopt,
unsigned long FILE_BUFFER_SIZE_ = 1000);
contentsOfWordsFileAndDocsfile = std::nullopt);

// Return a static `QueryExecutionContext` that refers to an index that was
// build using `makeTestIndex` (see above). The index (most notably its
@@ -61,8 +60,7 @@ QueryExecutionContext* getQec(
ad_utility::MemorySize blocksizePermutations = 16_B,
bool createTextIndex = false, bool addWordsFromLiterals = true,
std::optional<std::pair<std::string, std::string>>
contentsOfWordsFileAndDocsfile = std::nullopt,
unsigned long FILE_BUFFER_SIZE_ = 1000);
contentsOfWordsFileAndDocsfile = std::nullopt);

// Return a lambda that takes a string and converts it into an ID by looking
// it up in the vocabulary of `index`. An `AD_CONTRACT_CHECK` will fail if the