Skip to content

Commit

Permalink
Remove Query::variables()
Browse files Browse the repository at this point in the history
  • Loading branch information
fsaintjacques committed Jan 24, 2020
1 parent 63c3c1f commit d76cac9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions include/jitmap/query/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class Query : util::Pimpl<QueryImpl> {
// Return the expression of the query.
const Expr& expr() const;

// Return the names of the referenced bitmap (variables) in the expression.
const std::vector<std::string>& variables() const;

private:
Query(std::string name, std::string query, ExecutionContext* context);
};
Expand Down
4 changes: 0 additions & 4 deletions src/jitmap/query/query.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ class QueryImpl {
query_(std::move(query)),
expr_(Parse(query_, &builder_)),
optimized_expr_(Optimizer(&builder_).Optimize(*expr_)),
variables_(expr_->Variables()),
context_(context) {}

// Accessors
const std::string& name() const { return name_; }
const std::string& query() const { return query_; }
const Expr& expr() const { return *expr_; }
const Expr& optimized_expr() const { return *optimized_expr_; }
const std::vector<std::string>& variables() const { return variables_; }
DenseEvalFn impl() const { return context_->jit()->LookupUserQuery(name()); }

private:
Expand All @@ -49,7 +47,6 @@ class QueryImpl {
ExprBuilder builder_;
Expr* expr_;
Expr* optimized_expr_;
std::vector<std::string> variables_;
ExecutionContext* context_;
};

Expand All @@ -68,7 +65,6 @@ std::shared_ptr<Query> Query::Make(const std::string& name, const std::string& e

const std::string& Query::name() const { return impl().name(); }
const Expr& Query::expr() const { return impl().expr(); }
const std::vector<std::string>& Query::variables() const { return impl().variables(); }

} // namespace query
} // namespace jitmap

0 comments on commit d76cac9

Please sign in to comment.