wjones127 commented on code in PR #34668:
URL: https://github.com/apache/arrow/pull/34668#discussion_r1144053408


##########
cpp/src/parquet/encoding.cc:
##########
@@ -2723,6 +2730,7 @@ class DeltaLengthByteArrayDecoder : public DecoderImpl,
     // Decode up to `max_values` strings into an internal buffer
     // and reference them into `buffer`.
     max_values = std::min(max_values, num_valid_values_);
+    DCHECK_GE(max_values, 0);

Review Comment:
   That might be safer, but as-is we should never trip that. I added this in 
case someone refactors the class and adds another code path where 
`num_valid_values_` might not be initialized. Do you still think it's 
worthwhile?



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

Reply via email to