Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cpp/src/parquet/decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ struct ArrowBinaryHelper<ByteArrayType, ArrowBinaryType> {

Status AppendValue(const uint8_t* data, int32_t length,
std::optional<int64_t> estimated_remaining_data_length = {}) {
if (ARROW_PREDICT_FALSE(data == nullptr)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we need find out in which case this is nullptr

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you investigated this @mapleFU ?

return Status::Invalid("data is nullptr");
}
if (!kIsBinaryView && estimated_remaining_data_length.has_value()) {
// Assume Prepare() was already called with an estimated_data_length
builder_->UnsafeAppend(data, length);
Expand Down Expand Up @@ -207,6 +210,9 @@ struct ArrowBinaryHelper<FLBAType, ::arrow::FixedSizeBinaryType> {

Status AppendValue(const uint8_t* data, int32_t length,
std::optional<int64_t> estimated_remaining_data_length = {}) {
if (ARROW_PREDICT_FALSE(data == nullptr)) {
return Status::Invalid("data is nullptr");
}
acc_->UnsafeAppend(data);
return Status::OK();
}
Expand Down
Loading