diff --git a/cpp/src/parquet/page_index.cc b/cpp/src/parquet/page_index.cc index b9959f8b4aaf2..b60b5ffcaf659 100644 --- a/cpp/src/parquet/page_index.cc +++ b/cpp/src/parquet/page_index.cc @@ -696,7 +696,7 @@ class OffsetIndexBuilderImpl final : public OffsetIndexBuilder { if (offset_index_.page_locations.size() == offset_index_.unencoded_byte_array_data_bytes.size()) { offset_index_.__isset.unencoded_byte_array_data_bytes = true; - } else { + } else if (!offset_index_.unencoded_byte_array_data_bytes.empty()) { std::stringstream ss; ss << "Invalid count of unencoded BYTE_ARRAY data bytes: " << offset_index_.unencoded_byte_array_data_bytes.size()