pitrou commented on code in PR #39526: URL: https://github.com/apache/arrow/pull/39526#discussion_r1446028279
########## cpp/src/parquet/column_reader.cc: ########## @@ -884,19 +884,20 @@ class ColumnReaderImplBase { } else { switch (encoding) { case Encoding::PLAIN: { Review Comment: Can we simplify these different `case` statements? Unless I'm missing something, they're executing the same code. So this could be: ```cpp switch (encoding) { case Encoding::PLAIN: case Encoding::BYTE_STREAM_SPLIT: case Encoding::RLE: case Encoding::DELTA_BINARY_PACKED: case Encoding::DELTA_BYTE_ARRAY: case Encoding::DELTA_LENGTH_BYTE_ARRAY: auto decoder = MakeTypedDecoder<DType>(encoding, descr_, pool_); current_decoder_ = decoder.get(); decoders_[static_cast<int>(encoding)] = std::move(decoder); break; case Encoding::RLE_DICTIONARY: throw ParquetException("Dictionary page must be before data page."); default: throw ParquetException("Unknown encoding type."); } ``` -- 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