diff --git a/cpp/src/io/orc/dict_enc.cu b/cpp/src/io/orc/dict_enc.cu index 5971482f80c..5181c4a1c0e 100644 --- a/cpp/src/io/orc/dict_enc.cu +++ b/cpp/src/io/orc/dict_enc.cu @@ -16,6 +16,7 @@ #include "orc_gpu.hpp" +#include #include #include #include @@ -43,11 +44,12 @@ CUDF_KERNEL void rowgroup_char_counts_kernel(device_2dspan char_count auto const start_row = rowgroup_bounds[row_group_idx][col_idx].begin + str_col.offset(); auto const num_rows = rowgroup_bounds[row_group_idx][col_idx].size(); - auto const& offsets = str_col.child(strings_column_view::offsets_column_index); + auto const& offsets = str_col.child(strings_column_view::offsets_column_index); + auto const offsets_itr = cudf::detail::input_offsetalator(offsets.head(), offsets.type()); char_counts[str_col_idx][row_group_idx] = (num_rows == 0) ? 0 - : offsets.element(start_row + num_rows) - offsets.element(start_row); + : static_cast(offsets_itr[start_row + num_rows] - offsets_itr[start_row]); } void rowgroup_char_counts(device_2dspan counts,