You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/18 06:18:27 UTC
[GitHub] [arrow] sfc-gh-nthimmegowda commented on a diff in pull request #14147: ARROW-17450 : [C++][Parquet] Support RLE encoding for boolean datatype
sfc-gh-nthimmegowda commented on code in PR #14147:
URL: https://github.com/apache/arrow/pull/14147#discussion_r973666767
##########
cpp/src/parquet/encoding.cc:
##########
@@ -2355,6 +2355,83 @@ class DeltaLengthByteArrayDecoder : public DecoderImpl,
std::shared_ptr<ResizableBuffer> buffered_data_;
};
+// ----------------------------------------------------------------------
+// RLE_BOOLEAN_DECODER
+
+class RleBooleanDecoder : public DecoderImpl, virtual public BooleanDecoder {
+
+ public:
+ explicit RleBooleanDecoder(const ColumnDescriptor* descr)
+ :DecoderImpl(descr, Encoding::RLE) {}
+
+ void SetData(int num_values, const uint8_t* data, int len) override {
+ num_values_ = num_values;
+ int32_t num_bytes = 0;
+
+ if (len < 4) {
+ throw ParquetException("Received invalid length (corrupt data page?)");
Review Comment:
Modified error message to show invalid length.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org