diff --git a/cpp/src/merge/merge.cu b/cpp/src/merge/merge.cu index e47abd6ede4..ee29c207cf1 100644 --- a/cpp/src/merge/merge.cu +++ b/cpp/src/merge/merge.cu @@ -638,13 +638,14 @@ table_ptr_type merge(std::vector const& tables_to_merge, CUDF_EXPECTS(key_cols.size() == column_order.size(), "Mismatched size between key_cols and column_order"); - CUDF_EXPECTS(std::accumulate(tables_to_merge.cbegin(), - tables_to_merge.cend(), - cudf::size_type{0}, - [](auto const& running_sum, auto const& tbl) { - return running_sum + tbl.num_rows(); - }) <= std::numeric_limits::max(), - "Total number of merged rows exceeds row limit"); + CUDF_EXPECTS( + std::accumulate(tables_to_merge.cbegin(), + tables_to_merge.cend(), + std::size_t{0}, + [](auto const& running_sum, auto const& tbl) { + return running_sum + static_cast(tbl.num_rows()); + }) <= static_cast(std::numeric_limits::max()), + "Total number of merged rows exceeds row limit"); // This utility will ensure all corresponding dictionary columns have matching keys. // It will return any new dictionary columns created as well as updated table_views.