@@ -33,7 +33,7 @@ void cudf_aggregate(vector<shared_ptr<GPUColumn>>& column, uint64_t num_aggregat
3333 if (agg_mode[agg_idx] == AggregationType::COUNT_STAR || agg_mode[agg_idx] == AggregationType::COUNT ) {
3434 uint64_t * temp = gpuBufferManager->customCudaMalloc <uint64_t >(1 , 0 , 0 );
3535 cudaMemset (temp, 0 , sizeof (uint64_t ));
36- column[agg_idx] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT64 , reinterpret_cast <uint8_t *>(temp));
36+ column[agg_idx] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT64 ) , reinterpret_cast <uint8_t *>(temp));
3737 } else {
3838 column[agg_idx] = make_shared_ptr<GPUColumn>(0 , column[agg_idx]->data_wrapper .type , column[agg_idx]->data_wrapper .data );
3939 }
@@ -58,17 +58,17 @@ void cudf_aggregate(vector<shared_ptr<GPUColumn>>& column, uint64_t num_aggregat
5858 if (column[agg]->data_wrapper .data == nullptr && agg_mode[agg] == AggregationType::COUNT && column[agg]->column_length == 0 ) {
5959 uint64_t * temp = gpuBufferManager->customCudaMalloc <uint64_t >(1 , 0 , 0 );
6060 cudaMemset (temp, 0 , sizeof (uint64_t ));
61- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT64 , reinterpret_cast <uint8_t *>(temp));
61+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT64 ) , reinterpret_cast <uint8_t *>(temp));
6262 } else if (column[agg]->data_wrapper .data == nullptr && agg_mode[agg] == AggregationType::SUM && column[agg]->column_length == 0 ) {
6363 uint64_t * temp = gpuBufferManager->customCudaMalloc <uint64_t >(1 , 0 , 0 );
6464 cudaMemset (temp, 0 , sizeof (uint64_t ));
65- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT64 , reinterpret_cast <uint8_t *>(temp));
65+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT64 ) , reinterpret_cast <uint8_t *>(temp));
6666 } else if (column[agg]->data_wrapper .data == nullptr && agg_mode[agg] == AggregationType::COUNT_STAR && column[agg]->column_length != 0 ) {
6767 uint64_t * res = gpuBufferManager->customCudaHostAlloc <uint64_t >(1 );
6868 res[0 ] = size;
6969 uint64_t * result_temp = gpuBufferManager->customCudaMalloc <uint64_t >(1 , 0 , 0 );
7070 cudaMemcpy (result_temp, res, sizeof (uint64_t ), cudaMemcpyHostToDevice);
71- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT64 , reinterpret_cast <uint8_t *>(result_temp));
71+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT64 ) , reinterpret_cast <uint8_t *>(result_temp));
7272 } else if (agg_mode[agg] == AggregationType::SUM ) {
7373 auto aggregate = make_reduce_aggregation<cudf::reduce_aggregation::SUM >();
7474 auto cudf_column = column[agg]->convertToCudfColumn ();
@@ -94,29 +94,29 @@ void cudf_aggregate(vector<shared_ptr<GPUColumn>>& column, uint64_t num_aggregat
9494 res[0 ] = size;
9595 uint64_t * result_temp = gpuBufferManager->customCudaMalloc <uint64_t >(1 , 0 , 0 );
9696 cudaMemcpy (result_temp, res, sizeof (uint64_t ), cudaMemcpyHostToDevice);
97- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT64 , reinterpret_cast <uint8_t *>(result_temp));
97+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT64 ) , reinterpret_cast <uint8_t *>(result_temp));
9898 } else if (agg_mode[agg] == AggregationType::FIRST ) {
99- if (column[agg]->data_wrapper .type == ColumnType ::INT64 ) {
99+ if (column[agg]->data_wrapper .type . id () == GPUColumnTypeId ::INT64 ) {
100100 uint64_t * result_temp = gpuBufferManager->customCudaMalloc <uint64_t >(1 , 0 , 0 );
101101 cudaMemcpy (result_temp, reinterpret_cast <uint64_t *>(column[agg]->data_wrapper .data ), sizeof (uint64_t ), cudaMemcpyDeviceToDevice);
102- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT64 , reinterpret_cast <uint8_t *>(result_temp));
103- } else if (column[agg]->data_wrapper .type == ColumnType ::INT32 ) {
102+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT64 ) , reinterpret_cast <uint8_t *>(result_temp));
103+ } else if (column[agg]->data_wrapper .type . id () == GPUColumnTypeId ::INT32 ) {
104104 int32_t * result_temp = gpuBufferManager->customCudaMalloc <int32_t >(1 , 0 , 0 );
105105 cudaMemcpy (result_temp, reinterpret_cast <int32_t *>(column[agg]->data_wrapper .data ), sizeof (int32_t ), cudaMemcpyDeviceToDevice);
106- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::INT32 , reinterpret_cast <uint8_t *>(result_temp));
107- } else if (column[agg]->data_wrapper .type == ColumnType ::FLOAT32 ) {
106+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::INT32 ) , reinterpret_cast <uint8_t *>(result_temp));
107+ } else if (column[agg]->data_wrapper .type . id () == GPUColumnTypeId ::FLOAT32 ) {
108108 float * result_temp = gpuBufferManager->customCudaMalloc <float >(1 , 0 , 0 );
109109 cudaMemcpy (result_temp, reinterpret_cast <float *>(column[agg]->data_wrapper .data ), sizeof (float ), cudaMemcpyDeviceToDevice);
110- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::FLOAT32 , reinterpret_cast <uint8_t *>(result_temp));
111- } else if (column[agg]->data_wrapper .type == ColumnType ::FLOAT64 ) {
110+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::FLOAT32 ) , reinterpret_cast <uint8_t *>(result_temp));
111+ } else if (column[agg]->data_wrapper .type . id () == GPUColumnTypeId ::FLOAT64 ) {
112112 double * result_temp = gpuBufferManager->customCudaMalloc <double >(1 , 0 , 0 );
113113 cudaMemcpy (result_temp, reinterpret_cast <double *>(column[agg]->data_wrapper .data ), sizeof (double ), cudaMemcpyDeviceToDevice);
114- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::FLOAT64 , reinterpret_cast <uint8_t *>(result_temp));
115- } else if (column[agg]->data_wrapper .type == ColumnType ::BOOLEAN ) {
114+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::FLOAT64 ) , reinterpret_cast <uint8_t *>(result_temp));
115+ } else if (column[agg]->data_wrapper .type . id () == GPUColumnTypeId ::BOOLEAN ) {
116116 uint8_t * result_temp = gpuBufferManager->customCudaMalloc <uint8_t >(1 , 0 , 0 );
117117 cudaMemcpy (result_temp, reinterpret_cast <uint8_t *>(column[agg]->data_wrapper .data ), sizeof (uint8_t ), cudaMemcpyDeviceToDevice);
118- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::BOOLEAN , reinterpret_cast <uint8_t *>(result_temp));
119- } else if (column[agg]->data_wrapper .type == ColumnType ::VARCHAR ) {
118+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::BOOLEAN ) , reinterpret_cast <uint8_t *>(result_temp));
119+ } else if (column[agg]->data_wrapper .type . id () == GPUColumnTypeId ::VARCHAR ) {
120120 uint64_t * length = gpuBufferManager->customCudaHostAlloc <uint64_t >(1 );
121121 cudaMemcpy (length, column[agg]->data_wrapper .offset + 1 , sizeof (uint64_t ), cudaMemcpyDeviceToHost);
122122
@@ -126,7 +126,7 @@ void cudf_aggregate(vector<shared_ptr<GPUColumn>>& column, uint64_t num_aggregat
126126 uint64_t * new_offset = gpuBufferManager->customCudaMalloc <uint64_t >(2 , 0 , 0 );
127127 cudaMemcpy (new_offset, column[agg]->data_wrapper .offset , 2 * sizeof (uint64_t ), cudaMemcpyDeviceToDevice);
128128
129- column[agg] = make_shared_ptr<GPUColumn>(1 , ColumnType ::VARCHAR , reinterpret_cast <uint8_t *>(result_temp), new_offset, length[0 ], true );
129+ column[agg] = make_shared_ptr<GPUColumn>(1 , GPUColumnType (GPUColumnTypeId ::VARCHAR ) , reinterpret_cast <uint8_t *>(result_temp), new_offset, length[0 ], true );
130130 }
131131 }
132132 else {
0 commit comments