Skip to content

Commit

Permalink
Fix a bug when intersecting an empty build side table (#4089)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfengHKU authored Aug 15, 2024
1 parent 2067ffa commit 5590bca
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions extension/httpfs/test/test_files/http.test
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ tinysnb1|KUZU
---- error
Runtime exception: Cannot attach a remote kuzu database due to invalid path: http://localhost/databases/tinysnb1.

#TODO(Ziyi): figure out a way to automate upload if storage has changed.
-CASE AttachDBWithNonEmptyWAL
-SKIP
-STATEMENT load extension "${KUZU_ROOT_DIRECTORY}/extension/httpfs/build/libhttpfs.kuzu_extension"
---- ok
-STATEMENT attach 'http://localhost/databases/non-empty-wal' as test (dbtype kuzu)
Expand Down
2 changes: 2 additions & 0 deletions extension/httpfs/test/test_files/s3_remote_database.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

--

#TODO(Ziyi): figure out a way to automate upload if storage has changed.
-CASE UWS3RemoteDB
-SKIP
-STATEMENT load extension "${KUZU_ROOT_DIRECTORY}/extension/httpfs/build/libhttpfs.kuzu_extension"
---- ok
-STATEMENT CALL s3_access_key_id='${UW_S3_ACCESS_KEY_ID}'
Expand Down
1 change: 1 addition & 0 deletions src/include/processor/operator/hash_join/join_hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class JoinHashTable : public BaseHashTable {
}
uint8_t* getTupleForHash(common::hash_t hash) {
auto slotIdx = getSlotIdxForHash(hash);
KU_ASSERT(slotIdx < maxNumHashSlots);
return ((uint8_t**)(hashSlotsBlocks[slotIdx >> numSlotsPerBlockLog2]
->getData()))[slotIdx & slotIdxInBlockMask];
}
Expand Down
3 changes: 3 additions & 0 deletions src/processor/operator/intersect/intersect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void Intersect::probeHTs() {
for (auto i = 0u; i < probeKeyVectors.size(); i++) {
KU_ASSERT(probeKeyVectors[i]->state->isFlat());
probedFlatTuples[i].clear();
if (sharedHTs[i]->getHashTable()->getNumTuples() == 0) {
continue;
}
auto key =
probeKeyVectors[i]->getValue<nodeID_t>(probeKeyVectors[i]->state->getSelVector()[0]);
function::Hash::operation<nodeID_t>(key, false, hashVal);
Expand Down
8 changes: 7 additions & 1 deletion test/test_files/hint/hint.test
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ Binder exception: Cannot bind x to a node or relationship pattern
5|0|2
5|0|3
5|2|0
5|3|0
5|3|0
-LOG EmptyWCOJBuild
-STATEMENT MATCH (a:person)-[e:knows]->(b:person)-[e2:knows]->(c:person), (a)-[e3:knows]->(c)
WHERE e2.date > date("2024-10-10")
HINT (((a JOIN e) JOIN b) MULTI_JOIN e2 MULTI_JOIN e3) JOIN c
RETURN a.ID, b.ID, c.ID
---- 0

0 comments on commit 5590bca

Please sign in to comment.