Skip to content

Commit

Permalink
Fix Memcheck error found in JSON_TEST JsonReaderTest.ErrorStrings (#1…
Browse files Browse the repository at this point in the history
…4164)

Fix missing null mask in string column names parsing. For parsing error, the row is made null. To write output properly, the nulls need to be passed so that they can be skipped during writing output stage in `parse_data`.
Fixes #14141

Authors:
  - Karthikeyan (https://github.com/karthikeyann)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Elias Stehle (https://github.com/elstehle)
  - Nghia Truong (https://github.com/ttnghia)

URL: #14164
  • Loading branch information
karthikeyann authored Sep 25, 2023
1 parent d67cc5d commit fe3cab5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/src/io/utilities/data_casting.cu
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,9 @@ std::unique_ptr<column> parse_data(
if (col_size == 0) { return make_empty_column(col_type); }
auto d_null_count = rmm::device_scalar<size_type>(null_count, stream);
auto null_count_data = d_null_count.data();
if (null_mask.is_empty()) {
null_mask = cudf::detail::create_null_mask(col_size, mask_state::ALL_VALID, stream, mr);
}

// Prepare iterator that returns (string_ptr, string_length)-pairs needed by type conversion
auto str_tuples = thrust::make_transform_iterator(offset_length_begin, to_string_view_pair{data});
Expand Down

0 comments on commit fe3cab5

Please sign in to comment.