Skip to content

Commit

Permalink
Fixed mem leaks and commented out a problematic assert, since two rel…
Browse files Browse the repository at this point in the history
…ations may share the same name
  • Loading branch information
Learus committed Jan 14, 2019
1 parent 0601a37 commit 2638888
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 96 deletions.
85 changes: 0 additions & 85 deletions Makefile

This file was deleted.

10 changes: 5 additions & 5 deletions src/statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void RHJ::Statistics::preprocess(const Query& query)
const Query::Predicate& predicate = query.predicates[i];

const tuple_key_t lrel = query.relations[predicate.left.rel],
lcol = query.relations[predicate.left.col];
lcol = predicate.left.col;

const Statistics lold(cache.statistics[lrel][lcol]);

Expand Down Expand Up @@ -334,7 +334,7 @@ void RHJ::Statistics::preprocess(const Query& query)
case Query::Predicate::Type::join_t:

const tuple_key_t rrel = query.relations[predicate.right.operand.rel],
rcol = query.relations[predicate.right.operand.col];
rcol = predicate.right.operand.col;

if( lrel == rrel && lcol != rcol )
continue;
Expand Down Expand Up @@ -365,11 +365,11 @@ float RHJ::Statistics::expected_cost
assert(predicate.type == Query::Predicate::Type::join_t);

const tuple_key_t lrel = cache.query->relations[predicate.left.rel],
lcol = cache.query->relations[predicate.left.col],
lcol = predicate.left.col,
rrel = cache.query->relations[predicate.right.operand.rel],
rcol = cache.query->relations[predicate.right.operand.col];
rcol = predicate.right.operand.col;

assert(lrel != rrel || lcol == rcol);
//assert(lrel != rrel || lcol == rcol);

const Statistics lold(clone[lrel][lcol]), rold(clone[rrel][rcol]);

Expand Down
6 changes: 0 additions & 6 deletions workload/input.txt

This file was deleted.

0 comments on commit 2638888

Please sign in to comment.