           }
           break;
         default: // To eliminate error for unhandled enumerant N_GDF_AGG_OPS
-          return GDF_INVALID_API_CALL;
+          gdf_error_code = GDF_INVALID_API_CALL;
         }
 
       if( out_col_values )

      {
        case GDF_MAX:
          {
            return gdf_group_by_hash<max_op>(ncols,
                                             cols,
                                             col_agg,
                                             out_col_values,
                                             out_col_agg,
                                             sort_result);
          }
        case GDF_MIN:
          {
            return gdf_group_by_hash<min_op>(ncols,
                                             cols,
                                             col_agg,
                                             out_col_values,
                                             out_col_agg,
                                             sort_result);
          }
        case GDF_SUM:
          {
            return gdf_group_by_hash<sum_op>(ncols,
                                             cols,
                                             col_agg,
                                             out_col_values,
                                             out_col_agg,
                                             sort_result);
          }
        case GDF_COUNT:
          {
            return gdf_group_by_hash<count_op>(ncols,
                                               cols,
                                               col_agg,
                                               out_col_values,
                                               out_col_agg,
                                               sort_result);
          }
        case GDF_AVG:
          {
            return gdf_group_by_hash_avg(ncols,
                                         cols,
                                         col_agg,
                                         out_col_values,
                                         out_col_agg);
          }
        default:
          std::cerr << "Unsupported aggregation method for hash-based groupby." << std::endl;
          return GDF_UNSUPPORTED_METHOD;
      }
    }
  else
    {
      return GDF_UNSUPPORTED_METHOD;
    }
  
  return GDF_SUCCESS;
}
}//end unknown namespace


#include "sqls_rtti_comp.hpp"
#include "groupby/groupby.cuh"
#include "groupby/hash/aggregation_operations.cuh"
#include "nvtx_utils.h"

//using IndexT = int;//okay...
using IndexT = size_t;
