diff --git a/cpp/src/parquet/arrow/reader_internal.cc b/cpp/src/parquet/arrow/reader_internal.cc index 12f36fe39cf8..b5207aca253f 100644 --- a/cpp/src/parquet/arrow/reader_internal.cc +++ b/cpp/src/parquet/arrow/reader_internal.cc @@ -725,9 +725,7 @@ struct DecimalConverter { return Status::Invalid("Invalid BYTE_ARRAY length for ", type->ToString()); } - auto out_ptr_view = reinterpret_cast(out_ptr); - out_ptr_view[0] = 0; - out_ptr_view[1] = 0; + std::memset(out_ptr, 0, type_length); // only convert rows that are not null if there are nulls, or // all rows, if there are not