Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
CerielJacobs committed Aug 29, 2019
2 parents 2625f5d + 452e9b3 commit 66c98c5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
20 changes: 10 additions & 10 deletions include/vlog/fcinttable.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class FCInternalTable {
throw 10;
}

virtual bool supportsMerge() const = 0;
virtual bool supportsMerge() const = 0;

virtual std::shared_ptr<const FCInternalTable> merge(
std::shared_ptr<const FCInternalTable> t, int nthreads) const = 0;
Expand Down Expand Up @@ -549,9 +549,9 @@ class InmemoryFCInternalTable final : public FCInternalTable {
const uint8_t *posConstantsToFilter,
const Term_t *valuesConstantsToFilter) const;

bool supportsMerge() const {
return true;
}
bool supportsMerge() const {
return true;
}

std::shared_ptr<const FCInternalTable> merge(std::shared_ptr<const FCInternalTable> t, int nthreads) const;

Expand Down Expand Up @@ -645,9 +645,9 @@ class EDBFCInternalTable final : public FCInternalTable {
return getSortedIterator();
}

bool supportsMerge() const {
return false;
}
bool supportsMerge() const {
return false;
}

std::shared_ptr<const FCInternalTable> merge(std::shared_ptr<const FCInternalTable> t, int nthreads) const;

Expand Down Expand Up @@ -778,9 +778,9 @@ class SingletonTable final : public FCInternalTable {
return new SingletonItr(iteration);
}

bool supportsMerge() const {
return false;
}
bool supportsMerge() const {
return false;
}

std::shared_ptr<const FCInternalTable> merge(std::shared_ptr<const FCInternalTable> t, int nthreads) const {
throw 10;
Expand Down
1 change: 1 addition & 0 deletions src/vlog/forward/edbfcinternaltable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ EDBFCInternalTable::EDBFCInternalTable(const size_t iteration,
nfields(literal.getNVars()),
query(QSQQuery(literal)),
layer(layer) {

uint8_t j = 0;
defaultSorting.clear();
for (uint8_t i = 0; i < literal.getTupleSize(); ++i) {
Expand Down
12 changes: 10 additions & 2 deletions src/vlog/forward/joinprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,6 @@ void JoinExecutor::mergejoin(const FCInternalTable * t1, SemiNaiver * naiver,
std::chrono::system_clock::time_point startGI = std::chrono::system_clock::now();
#endif


TableFilterer filterer(naiver);
std::vector<std::shared_ptr<const FCInternalTable>> tablesToMergeJoin;
FCIterator itr2 = naiver->getTable(newLiteralToQuery, min, max,
Expand Down Expand Up @@ -1995,7 +1994,16 @@ void JoinExecutor::do_mergejoin(const FCInternalTable * filteredT1,
*/
secS = std::chrono::system_clock::now() - startS;
FCInternalTableItr *itr2 = sortedItr2;
size_t t2Size = t2->getNRows();
size_t t2Size = 0;
if (vectors2.size() == 0) {
if (t2->isEmpty())
t2Size = 0;
else
t2Size = 1;
} else {
t2Size = vectors2[0]->size();
}
assert(t2->getNRows() == t2Size);
if (faster) {
sortedItr2 = new VectorFCInternalTableItr(vectors2, 0, t2Size);
LOG(TRACEL) << "Faster algo";
Expand Down

0 comments on commit 66c98c5

Please sign in to comment.