[8/8] incubator-quickstep git commit: Initial commit for QUICKSTEP-28 and QUICKSTEP-29.

2016-09-20 Thread hbdeshmukh
Initial commit for QUICKSTEP-28 and QUICKSTEP-29.

- This PR creates a specialized hash table implementation for
  aggregation.
- A hash table's bucket can store multiple AggregationStates,
  corresponding to various AggregationHandles in the query. Earlier we
  created one hash table for each AggregationHandle.
- All Aggregation states in a single hash table bucket are protected
  using a single mutex. Earlier AggregationStates provided internal
  concurrency protection (mutex).
- Single aggregationGroupBy method in StorageBlock.
- New methods for separating unary and nullary updation of AggregationState.
- Added TODO to move method from HashTableBase class.
- Added doxygen for the AggregationHandle new functions.


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

Branch: refs/heads/master
Commit: ac3512ceb16109702116aa2a51db382dc99ba23e
Parents: 43c7a42
Author: rathijit 
Authored: Mon Jul 4 02:44:48 2016 -0500
Committer: Harshad Deshmukh 
Committed: Tue Sep 20 15:26:52 2016 -0500

--
 catalog/CatalogTypedefs.hpp |2 +
 .../aggregation/AggregationConcreteHandle.cpp   |   21 +-
 .../aggregation/AggregationConcreteHandle.hpp   |  372 +--
 expressions/aggregation/AggregationHandle.hpp   |  118 +-
 .../aggregation/AggregationHandleAvg.cpp|  118 +-
 .../aggregation/AggregationHandleAvg.hpp|  118 +-
 .../aggregation/AggregationHandleCount.cpp  |  180 +-
 .../aggregation/AggregationHandleCount.hpp  |  111 +-
 .../aggregation/AggregationHandleDistinct.cpp   |5 +-
 .../aggregation/AggregationHandleDistinct.hpp   |   39 +-
 .../aggregation/AggregationHandleMax.cpp|   98 +-
 .../aggregation/AggregationHandleMax.hpp|  112 +-
 .../aggregation/AggregationHandleMin.cpp|   99 +-
 .../aggregation/AggregationHandleMin.hpp|  106 +-
 .../aggregation/AggregationHandleSum.cpp|  112 +-
 .../aggregation/AggregationHandleSum.hpp|  108 +-
 expressions/aggregation/CMakeLists.txt  |8 +
 .../tests/AggregationHandleAvg_unittest.cpp |  255 +-
 .../tests/AggregationHandleCount_unittest.cpp   |  311 ++-
 .../tests/AggregationHandleMax_unittest.cpp |  382 +--
 .../tests/AggregationHandleMin_unittest.cpp |  378 +--
 .../tests/AggregationHandleSum_unittest.cpp |  291 +-
 query_optimizer/ExecutionGenerator.cpp  |   20 +-
 .../tests/AggregationOperator_unittest.cpp  |3 +-
 storage/AggregationOperationState.cpp   |  314 ++-
 storage/AggregationOperationState.hpp   |   47 +-
 storage/CMakeLists.txt  |   55 +
 storage/FastHashTable.hpp   | 2515 ++
 storage/FastHashTableFactory.hpp|  257 ++
 storage/FastSeparateChainingHashTable.hpp   | 1750 
 storage/HashTable.hpp   |   10 -
 storage/HashTableBase.hpp   |   37 +-
 storage/HashTablePool.hpp   |   65 +
 storage/StorageBlock.cpp|   27 +-
 storage/StorageBlock.hpp|   16 +-
 35 files changed, 6803 insertions(+), 1657 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/ac3512ce/catalog/CatalogTypedefs.hpp
--
diff --git a/catalog/CatalogTypedefs.hpp b/catalog/CatalogTypedefs.hpp
index f7a2d53..70bac84 100644
--- a/catalog/CatalogTypedefs.hpp
+++ b/catalog/CatalogTypedefs.hpp
@@ -49,6 +49,8 @@ constexpr int kInvalidCatalogId = -1;
 // Used to indicate no preference for a NUMA Node ID.
 constexpr numa_node_id kAnyNUMANodeID = -1;
 
+constexpr attribute_id kInvalidAttributeID = -1;
+
 /** @} */
 
 }  // namespace quickstep

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/ac3512ce/expressions/aggregation/AggregationConcreteHandle.cpp
--
diff --git a/expressions/aggregation/AggregationConcreteHandle.cpp 
b/expressions/aggregation/AggregationConcreteHandle.cpp
index 719920f..e3fb520 100644
--- a/expressions/aggregation/AggregationConcreteHandle.cpp
+++ b/expressions/aggregation/AggregationConcreteHandle.cpp
@@ -23,6 +23,7 @@
 #include 
 
 #include "catalog/CatalogTypedefs.hpp"
+#include "storage/FastHashTable.hpp"
 #include "storage/HashTable.hpp"
 #include "storage/HashTableFactory.hpp"
 
@@ -51,22 +52,16 @@ void 
AggregationConcreteHandle::insertValueAccessorIntoDistinctifyHashTable(
 

[8/8] incubator-quickstep git commit: Initial commit for QUICKSTEP-28 and QUICKSTEP-29.

2016-09-20 Thread hbdeshmukh
Initial commit for QUICKSTEP-28 and QUICKSTEP-29.

- This PR creates a specialized hash table implementation for
  aggregation.
- A hash table's bucket can store multiple AggregationStates,
  corresponding to various AggregationHandles in the query. Earlier we
  created one hash table for each AggregationHandle.
- All Aggregation states in a single hash table bucket are protected
  using a single mutex. Earlier AggregationStates provided internal
  concurrency protection (mutex).
- Single aggregationGroupBy method in StorageBlock.
- New methods for separating unary and nullary updation of AggregationState.
- Added TODO to move method from HashTableBase class.
- Added doxygen for the AggregationHandle new functions.


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

Branch: refs/heads/quickstep-28-29
Commit: ac3512ceb16109702116aa2a51db382dc99ba23e
Parents: 43c7a42
Author: rathijit 
Authored: Mon Jul 4 02:44:48 2016 -0500
Committer: Harshad Deshmukh 
Committed: Tue Sep 20 15:26:52 2016 -0500

--
 catalog/CatalogTypedefs.hpp |2 +
 .../aggregation/AggregationConcreteHandle.cpp   |   21 +-
 .../aggregation/AggregationConcreteHandle.hpp   |  372 +--
 expressions/aggregation/AggregationHandle.hpp   |  118 +-
 .../aggregation/AggregationHandleAvg.cpp|  118 +-
 .../aggregation/AggregationHandleAvg.hpp|  118 +-
 .../aggregation/AggregationHandleCount.cpp  |  180 +-
 .../aggregation/AggregationHandleCount.hpp  |  111 +-
 .../aggregation/AggregationHandleDistinct.cpp   |5 +-
 .../aggregation/AggregationHandleDistinct.hpp   |   39 +-
 .../aggregation/AggregationHandleMax.cpp|   98 +-
 .../aggregation/AggregationHandleMax.hpp|  112 +-
 .../aggregation/AggregationHandleMin.cpp|   99 +-
 .../aggregation/AggregationHandleMin.hpp|  106 +-
 .../aggregation/AggregationHandleSum.cpp|  112 +-
 .../aggregation/AggregationHandleSum.hpp|  108 +-
 expressions/aggregation/CMakeLists.txt  |8 +
 .../tests/AggregationHandleAvg_unittest.cpp |  255 +-
 .../tests/AggregationHandleCount_unittest.cpp   |  311 ++-
 .../tests/AggregationHandleMax_unittest.cpp |  382 +--
 .../tests/AggregationHandleMin_unittest.cpp |  378 +--
 .../tests/AggregationHandleSum_unittest.cpp |  291 +-
 query_optimizer/ExecutionGenerator.cpp  |   20 +-
 .../tests/AggregationOperator_unittest.cpp  |3 +-
 storage/AggregationOperationState.cpp   |  314 ++-
 storage/AggregationOperationState.hpp   |   47 +-
 storage/CMakeLists.txt  |   55 +
 storage/FastHashTable.hpp   | 2515 ++
 storage/FastHashTableFactory.hpp|  257 ++
 storage/FastSeparateChainingHashTable.hpp   | 1750 
 storage/HashTable.hpp   |   10 -
 storage/HashTableBase.hpp   |   37 +-
 storage/HashTablePool.hpp   |   65 +
 storage/StorageBlock.cpp|   27 +-
 storage/StorageBlock.hpp|   16 +-
 35 files changed, 6803 insertions(+), 1657 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/ac3512ce/catalog/CatalogTypedefs.hpp
--
diff --git a/catalog/CatalogTypedefs.hpp b/catalog/CatalogTypedefs.hpp
index f7a2d53..70bac84 100644
--- a/catalog/CatalogTypedefs.hpp
+++ b/catalog/CatalogTypedefs.hpp
@@ -49,6 +49,8 @@ constexpr int kInvalidCatalogId = -1;
 // Used to indicate no preference for a NUMA Node ID.
 constexpr numa_node_id kAnyNUMANodeID = -1;
 
+constexpr attribute_id kInvalidAttributeID = -1;
+
 /** @} */
 
 }  // namespace quickstep

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/ac3512ce/expressions/aggregation/AggregationConcreteHandle.cpp
--
diff --git a/expressions/aggregation/AggregationConcreteHandle.cpp 
b/expressions/aggregation/AggregationConcreteHandle.cpp
index 719920f..e3fb520 100644
--- a/expressions/aggregation/AggregationConcreteHandle.cpp
+++ b/expressions/aggregation/AggregationConcreteHandle.cpp
@@ -23,6 +23,7 @@
 #include 
 
 #include "catalog/CatalogTypedefs.hpp"
+#include "storage/FastHashTable.hpp"
 #include "storage/HashTable.hpp"
 #include "storage/HashTableFactory.hpp"
 
@@ -51,22 +52,16 @@ void 
AggregationConcreteHandle::insertValueAccessorIntoDistinctifyHashTable(