pitrou commented on a change in pull request #12274:
URL: https://github.com/apache/arrow/pull/12274#discussion_r793437109
##########
File path: cpp/src/parquet/encoding.cc
##########
@@ -1486,8 +1486,9 @@ class DictDecoderImpl : public DecoderImpl, virtual
public DictDecoder<Type> {
return;
}
uint8_t bit_width = *data;
- if (ARROW_PREDICT_FALSE(bit_width >= 64)) {
- throw ParquetException("Invalid or corrupted bit_width");
+ if (ARROW_PREDICT_FALSE(bit_width > 32)) {
+ throw ParquetException("Invalid or corrupted bit_width " +
+ std::to_string(bit_width) + ". Maximum allowed is
32.");
Review comment:
Speaking of which, is 0 accepted as a bit width or should be raise an
error in that case also?
--
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]