 #include <gdf/cffi/functions.h>
 
 #include "gdf_test_utils.cuh"
+#include "../../gdf_table.cuh"
+#include "../../hashmap/hash_functions.cuh"
+
+template <template <typename> class hash_function,
+         typename size_type>
+struct row_partition_mapper
+{
+  __device__
+  row_partition_mapper(gdf_table<size_type> const & table_to_hash, const size_type _num_partitions)
+    : the_table{table_to_hash}, num_partitions{_num_partitions}
+  {}
+
+  __device__
+  hash_value_type operator()(size_type row_index) const
+  {
+    return the_table.template hash_row<hash_function>(row_index) % num_partitions;
+  }
+
+  gdf_table<size_type> const & the_table;
+  const size_type num_partitions;
+};
 
 // Put all repeated setup and validation stuff here
 template <class test_parameters>
 struct HashPartitionTest : public testing::Test
 {
-  const size_t num_cols_to_hash = test_parameters::num_cols_to_hash;
+  const int num_cols_to_hash = test_parameters::num_cols_to_hash;
   std::array<int, test_parameters::num_cols_to_hash> cols_to_hash = test_parameters::cols_to_hash;
 
   // multi_column_t is a tuple of vectors. The number of vectors in the tuple


    EXPECT_EQ(GDF_SUCCESS, result_error);

    if(print){
    }
  }
};

    // Fill vector of raw pointers to gdf_columns
    for(auto const& c : gdf_input_columns){
      this->raw_gdf_input_columns.push_back(c.get());
    }
    for(auto const& c : gdf_output_columns){
      this->raw_gdf_output_columns.push_back(c.get());
    }

