diff --git a/cpp/src/transform/compute_column.cu b/cpp/src/transform/compute_column.cu index e11ff437c14..8fa5e75664f 100644 --- a/cpp/src/transform/compute_column.cu +++ b/cpp/src/transform/compute_column.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, NVIDIA CORPORATION. + * Copyright (c) 2020-2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,6 +97,7 @@ std::unique_ptr compute_column(table_view const& table, auto output_column = cudf::make_fixed_width_column( parser.output_type(), table.num_rows(), output_column_mask_state, stream, mr); + if (table.num_rows() == 0) { return output_column; } auto mutable_output_device = cudf::mutable_column_device_view::create(output_column->mutable_view(), stream);