wgtmac commented on code in PR #40594:
URL: https://github.com/apache/arrow/pull/40594#discussion_r1860945962


##########
cpp/src/parquet/encoding.h:
##########
@@ -158,6 +158,10 @@ class Encoder {
   virtual Encoding::type encoding() const = 0;
 
   virtual void Put(const ::arrow::Array& values) = 0;
+  // Report the number of bytes before encoding that have been written
+  // to the encoder since the last report. Note that this call is not
+  // idempotent because it resets the internal counter.
+  virtual int64_t ReportUnencodedDataBytes() = 0;

Review Comment:
   I tried to add `std::enable_if_t<std::is_same_v<DType, ByteArrayType>, 
int64_t> ReportUnencodedDataBytes()` to TypedEncoder. However, enable_if does 
not support virtual function and it is still ugly if this is not a virtual 
function. So I decided to keep it at the base class and throw for non-ByteArray 
type. WDYT?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to