emkornfield commented on a change in pull request #8632:
URL: https://github.com/apache/arrow/pull/8632#discussion_r527404377



##########
File path: cpp/src/parquet/encoding.cc
##########
@@ -127,6 +130,25 @@ class PlainEncoder : public EncoderImpl, virtual public 
TypedEncoder<DType> {
   }
 
  protected:
+  template <typename ArrayType>
+  void PutBinaryArray(const ArrayType& array) {
+    const int64_t total_bytes =
+        array.value_offset(array.length()) - array.value_offset(0);
+    PARQUET_THROW_NOT_OK(sink_.Reserve(total_bytes + array.length() * 
sizeof(uint32_t)));
+
+    constexpr size_t kMaxByteArraySize = std::numeric_limits<uint32_t>::max();

Review comment:
       its not clear from the spec, but I think this expected to be signed:
   
   
[Java](https://github.com/apache/parquet-mr/blob/7469e87dc63c0f672be7175946dc7af1219ec732/parquet-column/src/main/java/org/apache/parquet/column/values/plain/BinaryPlainValuesReader.java#L39)
 appears to use a int (signed 32 bit integer)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to