tachyonwill commented on a change in pull request #12274:
URL: https://github.com/apache/arrow/pull/12274#discussion_r793878788
##########
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:
0 is okay as far as I can tell. I created a dictionary encoded byte
array column that was all nulls. The resulting bit width was 0 and was readable
by both parquet cpp and parquet mr.
--
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]