pitrou commented on code in PR #48692:
URL: https://github.com/apache/arrow/pull/48692#discussion_r2685385568
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -2076,7 +2076,10 @@ Status
TypedColumnWriterImpl<ParquetType>::WriteArrowSerialize(
PARQUET_THROW_NOT_OK(ctx->GetScratchData<ParquetCType>(array.length(),
&buffer));
SerializeFunctor<ParquetType, ArrowType> functor;
- RETURN_NOT_OK(functor.Serialize(checked_cast<const ArrayType&>(array), ctx,
buffer));
+ // The value buffer could be empty if all values are nulls.
+ if (array.null_count() != array.length()) {
Review Comment:
All kinds of things can happen if an Arrow Array is invalid. The pointers
could be invalid. The length could be larger than the actual memory area, etc.
It's up to the caller to pass valid inputs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]