Skip to content

Commit

Permalink
remove workaround that seems to have already been fixed somehow
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Jun 3, 2024
1 parent ca2a0bd commit 1dfbc38
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/delta_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,8 @@ static bool CanHandleFilter(TableFilter *filter) {
}
}

// Prunes the list of predicates to ones that we can handle
static unordered_map<string, TableFilter*> PrunePredicates(unordered_map<string, TableFilter*> predicates) {
unordered_map<string, TableFilter*> result;
for (const auto &predicate : predicates) {
if (CanHandleFilter(predicate.second)) {
result[predicate.first] = predicate.second;
}

}
return result;
}

uintptr_t PredicateVisitor::VisitPredicate(PredicateVisitor* predicate, ffi::KernelExpressionVisitorState* state) {
auto filters = PrunePredicates(predicate->column_filters);
auto &filters = predicate->column_filters;

auto it = filters.begin();
auto end = filters.end();
Expand All @@ -239,12 +227,7 @@ uintptr_t PredicateVisitor::VisitPredicate(PredicateVisitor* predicate, ffi::Ker
};
auto eit = EngineIteratorFromCallable(get_next);

// TODO: this should be fixed upstream?
try {
return visit_expression_and(state, &eit);
} catch (...) {
return ~0;
}
return visit_expression_and(state, &eit);
}

uintptr_t PredicateVisitor::VisitConstantFilter(const string &col_name, const ConstantFilter &filter, ffi::KernelExpressionVisitorState* state) {
Expand Down

0 comments on commit 1dfbc38

Please sign in to comment.