Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
Delete the unsed index_predicate_ in index scan plans. (#1324)
Browse files Browse the repository at this point in the history
* Delete the unsed index_predicate_ in index scan plans.

* Fix a compilation issue.

* Move arguments to different lines.
  • Loading branch information
linmagit authored and pervazea committed Apr 25, 2018
1 parent 608ca7f commit 801df5f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
6 changes: 0 additions & 6 deletions src/include/planner/hybrid_scan_plan.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ class HybridScanPlan : public AbstractScan {
return expr_types_;
}

const index::IndexScanPredicate &GetIndexPredicate() const {
return index_predicate_;
}

const std::vector<type::Value> &GetValues() const { return values_; }

const std::vector<expression::AbstractExpression *> &GetRunTimeKeys() const {
Expand All @@ -81,8 +77,6 @@ class HybridScanPlan : public AbstractScan {

oid_t index_id_;

index::IndexScanPredicate index_predicate_;

private:
DISALLOW_COPY_AND_MOVE(HybridScanPlan);
};
Expand Down
12 changes: 1 addition & 11 deletions src/include/planner/index_scan_plan.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#include <string>
#include <vector>

#include "common/internal_types.h"
#include "expression/abstract_expression.h"
#include "index/scan_optimizer.h"
#include "planner/abstract_scan_plan.h"
#include "storage/tuple.h"
#include "common/internal_types.h"

namespace peloton {

Expand Down Expand Up @@ -123,10 +123,6 @@ class IndexScanPlan : public AbstractScan {
return expr_types_;
}

const index::IndexScanPredicate &GetIndexPredicate() const {
return index_predicate_;
}

const std::vector<type::Value> &GetValues() const { return values_; }

const std::vector<expression::AbstractExpression *> &GetRunTimeKeys() const {
Expand Down Expand Up @@ -204,12 +200,6 @@ class IndexScanPlan : public AbstractScan {

const std::vector<expression::AbstractExpression *> runtime_keys_;

// Currently we just support single conjunction predicate
//
// In the future this might be extended into an array of conjunctive
// predicates connected by disjunction
index::IndexScanPredicate index_predicate_;

// whether the index scan range is left open
bool left_open_ = false;

Expand Down
3 changes: 1 addition & 2 deletions src/planner/hybrid_scan_plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ HybridScanPlan::HybridScanPlan(
expr_types_(std::move(index_scan_desc.expr_list)),
values_(std::move(index_scan_desc.value_list)),
runtime_keys_(std::move(index_scan_desc.runtime_key_list)),
index_id_(index_scan_desc.index_id),
index_predicate_() {}
index_id_(index_scan_desc.index_id) {}

} // namespace planner
} // namespace peloton
7 changes: 2 additions & 5 deletions src/planner/index_scan_plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
//===----------------------------------------------------------------------===//

#include "planner/index_scan_plan.h"
#include "common/internal_types.h"
#include "expression/constant_value_expression.h"
#include "expression/expression_util.h"
#include "storage/data_table.h"
#include "common/internal_types.h"

namespace peloton {
namespace planner {
Expand All @@ -29,10 +29,7 @@ IndexScanPlan::IndexScanPlan(storage::DataTable *table,
key_column_ids_(std::move(index_scan_desc.tuple_column_id_list)),
expr_types_(std::move(index_scan_desc.expr_list)),
values_with_params_(std::move(index_scan_desc.value_list)),
runtime_keys_(std::move(index_scan_desc.runtime_key_list)),
// Initialize the index scan predicate object and initialize all
// keys that we could initialize
index_predicate_() {
runtime_keys_(std::move(index_scan_desc.runtime_key_list)) {
LOG_TRACE("Creating an Index Scan Plan");

if (for_update_flag == true) {
Expand Down

0 comments on commit 801df5f

Please sign in to comment.