You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by na...@apache.org on 2016/06/29 18:16:44 UTC

incubator-quickstep git commit: Remove unused flag always_mark_full in InsertDestinationInterface

Repository: incubator-quickstep
Updated Branches:
  refs/heads/remove_alwayscreateinsertdest e7f67705c -> 8ab20ffa0


Remove unused flag always_mark_full in InsertDestinationInterface


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/8ab20ffa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/8ab20ffa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/8ab20ffa

Branch: refs/heads/remove_alwayscreateinsertdest
Commit: 8ab20ffa07a362ac4f0ef743c5b451a26bf882bc
Parents: e7f6770
Author: Navneet Potti <na...@cs.wisc.edu>
Authored: Wed Jun 29 13:16:13 2016 -0500
Committer: Navneet Potti <na...@cs.wisc.edu>
Committed: Wed Jun 29 13:16:13 2016 -0500

----------------------------------------------------------------------
 storage/InsertDestination.cpp          | 19 ++++++++-----------
 storage/InsertDestination.hpp          | 10 ++++------
 storage/InsertDestinationInterface.hpp | 10 ++--------
 3 files changed, 14 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/8ab20ffa/storage/InsertDestination.cpp
----------------------------------------------------------------------
diff --git a/storage/InsertDestination.cpp b/storage/InsertDestination.cpp
index 2ed3aa3..99ba36b 100644
--- a/storage/InsertDestination.cpp
+++ b/storage/InsertDestination.cpp
@@ -189,7 +189,7 @@ void InsertDestination::insertTupleInBatch(const Tuple &tuple) {
   returnBlock(std::move(output_block), false);
 }
 
-void InsertDestination::bulkInsertTuples(ValueAccessor *accessor, bool always_mark_full) {
+void InsertDestination::bulkInsertTuples(ValueAccessor *accessor) {
   InvokeOnAnyValueAccessor(
       accessor,
       [&](auto *accessor) -> void {  // NOLINT(build/c++11)
@@ -204,7 +204,7 @@ void InsertDestination::bulkInsertTuples(ValueAccessor *accessor, bool always_ma
         // Bulk insert into output_block was successful. output_block
         // will be rebuilt when there won't be any more insertions to it.
         this->returnBlock(std::move(output_block),
-                          always_mark_full || !accessor->iterationFinished());
+                          !accessor->iterationFinished());
       }
     }
   });
@@ -212,8 +212,7 @@ void InsertDestination::bulkInsertTuples(ValueAccessor *accessor, bool always_ma
 
 void InsertDestination::bulkInsertTuplesWithRemappedAttributes(
     const std::vector<attribute_id> &attribute_map,
-    ValueAccessor *accessor,
-    bool always_mark_full) {
+    ValueAccessor *accessor) {
   InvokeOnAnyValueAccessor(
       accessor,
       [&](auto *accessor) -> void {  // NOLINT(build/c++11)
@@ -230,7 +229,7 @@ void InsertDestination::bulkInsertTuplesWithRemappedAttributes(
         // Bulk insert into output_block was successful. output_block
         // will be rebuilt when there won't be any more insertions to it.
         this->returnBlock(std::move(output_block),
-                          always_mark_full || !accessor->iterationFinished());
+                          !accessor->iterationFinished());
       }
     }
   });
@@ -466,7 +465,7 @@ void PartitionAwareInsertDestination::insertTupleInBatch(const Tuple &tuple) {
   returnBlockInPartition(std::move(output_block), false, part_id);
 }
 
-void PartitionAwareInsertDestination::bulkInsertTuples(ValueAccessor *accessor, bool always_mark_full) {
+void PartitionAwareInsertDestination::bulkInsertTuples(ValueAccessor *accessor) {
   const std::size_t num_partitions = partition_scheme_header_->getNumPartitions();
   const attribute_id partition_attribute_id = partition_scheme_header_->getPartitionAttributeId();
 
@@ -474,7 +473,6 @@ void PartitionAwareInsertDestination::bulkInsertTuples(ValueAccessor *accessor,
       accessor,
       [this,
        &partition_attribute_id,
-       &always_mark_full,
        &num_partitions](auto *accessor) -> void {  // NOLINT(build/c++11)
     std::vector<std::unique_ptr<TupleIdSequence>> partition_membership;
     partition_membership.resize(num_partitions);
@@ -513,7 +511,7 @@ void PartitionAwareInsertDestination::bulkInsertTuples(ValueAccessor *accessor,
           // Bulk insert into output_block was successful. output_block
           // will be rebuilt when there won't be any more insertions to it.
           this->returnBlockInPartition(std::move(output_block),
-                                       always_mark_full || !adapter[partition]->iterationFinished(),
+                                       !adapter[partition]->iterationFinished(),
                                        partition);
         }
       }
@@ -522,7 +520,7 @@ void PartitionAwareInsertDestination::bulkInsertTuples(ValueAccessor *accessor,
 }
 
 void PartitionAwareInsertDestination::bulkInsertTuplesWithRemappedAttributes(
-    const std::vector<attribute_id> &attribute_map, ValueAccessor *accessor, bool always_mark_full) {
+    const std::vector<attribute_id> &attribute_map, ValueAccessor *accessor) {
   const std::size_t num_partitions = partition_scheme_header_->getNumPartitions();
   const attribute_id partition_attribute_id = partition_scheme_header_->getPartitionAttributeId();
 
@@ -531,7 +529,6 @@ void PartitionAwareInsertDestination::bulkInsertTuplesWithRemappedAttributes(
       [this,
        &partition_attribute_id,
        &attribute_map,
-       &always_mark_full,
        &num_partitions](auto *accessor) -> void {  // NOLINT(build/c++11)
     std::vector<std::unique_ptr<TupleIdSequence>> partition_membership;
     partition_membership.resize(num_partitions);
@@ -570,7 +567,7 @@ void PartitionAwareInsertDestination::bulkInsertTuplesWithRemappedAttributes(
           // Bulk insert into output_block was successful. output_block
           // will be rebuilt when there won't be any more insertions to it.
           this->returnBlockInPartition(std::move(output_block),
-                                       always_mark_full || !adapter[partition]->iterationFinished(),
+                                       !adapter[partition]->iterationFinished(),
                                        partition);
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/8ab20ffa/storage/InsertDestination.hpp
----------------------------------------------------------------------
diff --git a/storage/InsertDestination.hpp b/storage/InsertDestination.hpp
index 772d250..66c6b74 100644
--- a/storage/InsertDestination.hpp
+++ b/storage/InsertDestination.hpp
@@ -143,12 +143,11 @@ class InsertDestination : public InsertDestinationInterface {
 
   void insertTupleInBatch(const Tuple &tuple) override;
 
-  void bulkInsertTuples(ValueAccessor *accessor, bool always_mark_full = false) override;
+  void bulkInsertTuples(ValueAccessor *accessor) override;
 
   void bulkInsertTuplesWithRemappedAttributes(
       const std::vector<attribute_id> &attribute_map,
-      ValueAccessor *accessor,
-      bool always_mark_full = false) override;
+      ValueAccessor *accessor) override;
 
   void insertTuplesFromVector(std::vector<Tuple>::const_iterator begin,
                               std::vector<Tuple>::const_iterator end) override;
@@ -466,12 +465,11 @@ class PartitionAwareInsertDestination : public InsertDestination {
 
   void insertTupleInBatch(const Tuple &tuple) override;
 
-  void bulkInsertTuples(ValueAccessor *accessor, bool always_mark_full = false) override;
+  void bulkInsertTuples(ValueAccessor *accessor) override;
 
   void bulkInsertTuplesWithRemappedAttributes(
       const std::vector<attribute_id> &attribute_map,
-      ValueAccessor *accessor,
-      bool always_mark_full = false) override;
+      ValueAccessor *accessor) override;
 
   void insertTuplesFromVector(std::vector<Tuple>::const_iterator begin,
                               std::vector<Tuple>::const_iterator end) override;

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/8ab20ffa/storage/InsertDestinationInterface.hpp
----------------------------------------------------------------------
diff --git a/storage/InsertDestinationInterface.hpp b/storage/InsertDestinationInterface.hpp
index a66a149..5e2d085 100644
--- a/storage/InsertDestinationInterface.hpp
+++ b/storage/InsertDestinationInterface.hpp
@@ -95,11 +95,8 @@ class InsertDestinationInterface {
    *
    * @param accessor A ValueAccessor whose tuples will by inserted into blocks
    *        from this InsertDestination.
-   * @param always_mark_full If \c true, always mark the blocks full after
-   *        insertion from ValueAccessor even when partially full.
    **/
-  virtual void bulkInsertTuples(ValueAccessor *accessor,
-                                bool always_mark_full = false) = 0;
+  virtual void bulkInsertTuples(ValueAccessor *accessor) = 0;
 
   /**
    * @brief Bulk-insert tuples from a ValueAccessor with differently-ordered
@@ -110,13 +107,10 @@ class InsertDestinationInterface {
    *        corresponding attributes which should be read from accessor.
    * @param accessor A ValueAccessor whose tuples will by inserted into blocks
    *        from this InsertDestination.
-   * @param always_mark_full If \c true, always mark the blocks full after
-   *        insertion from ValueAccessor even when partially full.
    **/
   virtual void bulkInsertTuplesWithRemappedAttributes(
       const std::vector<attribute_id> &attribute_map,
-      ValueAccessor *accessor,
-      bool always_mark_full = false) = 0;
+      ValueAccessor *accessor) = 0;
 
   /**
    * @brief Insert tuples from a range of Tuples in a vector.