diff --git a/cpp/src/binaryop/compiled/binary_ops.cu b/cpp/src/binaryop/compiled/binary_ops.cu index 147817bd1da..c7dcc2a968e 100644 --- a/cpp/src/binaryop/compiled/binary_ops.cu +++ b/cpp/src/binaryop/compiled/binary_ops.cu @@ -80,8 +80,8 @@ scalar_as_column_view::return_type scalar_as_column_view::operator()(s.validity_data()), + static_cast(!s.is_valid(stream)), 0, {offsets_column->view(), chars_column_v}); return std::pair{col_v, std::move(offsets_column)}; diff --git a/cpp/src/copying/pack.cpp b/cpp/src/copying/pack.cpp index 427f2dfdade..53006bc62ff 100644 --- a/cpp/src/copying/pack.cpp +++ b/cpp/src/copying/pack.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -159,12 +159,8 @@ packed_columns::metadata pack_metadata(ColumnIter begin, // first metadata entry is a stub indicating how many total (top level) columns // there are - metadata.emplace_back(data_type{type_id::EMPTY}, - static_cast(std::distance(begin, end)), - UNKNOWN_NULL_COUNT, - -1, - -1, - 0); + metadata.emplace_back( + data_type{type_id::EMPTY}, static_cast(std::distance(begin, end)), 0, -1, -1, 0); std::for_each(begin, end, [&metadata, &contiguous_buffer, &buffer_size](column_view const& col) { build_column_metadata(metadata, col, contiguous_buffer, buffer_size); diff --git a/cpp/src/interop/from_arrow.cu b/cpp/src/interop/from_arrow.cu index 710f056dc9d..df173abddc3 100644 --- a/cpp/src/interop/from_arrow.cu +++ b/cpp/src/interop/from_arrow.cu @@ -284,7 +284,7 @@ std::unique_ptr dispatch_to_cudf_column::operator()( auto out_col = make_strings_column(num_rows, std::move(offsets_column), std::move(chars_column), - UNKNOWN_NULL_COUNT, + array.null_count(), std::move(*get_mask_buffer(array, stream, mr))); return num_rows == array.length() @@ -324,7 +324,7 @@ std::unique_ptr dispatch_to_cudf_column::operator()( return make_dictionary_column(std::move(keys_column), std::move(indices_column), std::move(*(column_contents.null_mask)), - UNKNOWN_NULL_COUNT); + array.null_count()); } template <> @@ -357,7 +357,7 @@ std::unique_ptr dispatch_to_cudf_column::operator()( } return make_structs_column( - array.length(), move(child_columns), UNKNOWN_NULL_COUNT, std::move(out_mask), stream, mr); + array.length(), move(child_columns), array.null_count(), std::move(out_mask), stream, mr); } template <> @@ -381,7 +381,7 @@ std::unique_ptr dispatch_to_cudf_column::operator()( auto out_col = make_lists_column(num_rows, std::move(offsets_column), std::move(child_column), - UNKNOWN_NULL_COUNT, + array.null_count(), std::move(*get_mask_buffer(array, stream, mr)), stream, mr); diff --git a/cpp/src/lists/copying/concatenate.cu b/cpp/src/lists/copying/concatenate.cu index 8ca26c0ebfb..28989e86b42 100644 --- a/cpp/src/lists/copying/concatenate.cu +++ b/cpp/src/lists/copying/concatenate.cu @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include #include @@ -29,6 +28,7 @@ #include +#include #include namespace cudf { diff --git a/cpp/src/lists/dremel.cu b/cpp/src/lists/dremel.cu index 5136cc8cd37..2b1978bec80 100644 --- a/cpp/src/lists/dremel.cu +++ b/cpp/src/lists/dremel.cu @@ -147,7 +147,7 @@ dremel_data get_encoding(column_view h_col, col.size(), col.head(), col.null_mask(), - UNKNOWN_NULL_COUNT, + col.null_count(), col.offset(), std::move(children)); }; diff --git a/cpp/src/transform/transform.cpp b/cpp/src/transform/transform.cpp index f24dc56d02f..6fb125617dc 100644 --- a/cpp/src/transform/transform.cpp +++ b/cpp/src/transform/transform.cpp @@ -78,7 +78,7 @@ std::unique_ptr transform(column_view const& input, CUDF_EXPECTS(is_fixed_width(input.type()), "Unexpected non-fixed-width type."); std::unique_ptr output = make_fixed_width_column( - output_type, input.size(), copy_bitmask(input), cudf::UNKNOWN_NULL_COUNT, stream, mr); + output_type, input.size(), copy_bitmask(input), input.null_count(), stream, mr); if (input.is_empty()) { return output; }