luffy-zh commented on code in PR #1932:
URL: https://github.com/apache/orc/pull/1932#discussion_r1609201271
##########
c++/src/Compression.cc:
##########
@@ -232,6 +244,22 @@ namespace orc {
}
rawInputBuffer.resize(0);
}
+ }
+
+ bool CompressionStream::Next(void** data, int* size) {
+ if (rawInputBuffer.size() > compressionBlockSize) {
+ std::stringstream ss;
+ ss << "uncompressed data size " << rawInputBuffer.size() << " is larger
than block size "
+ << compressionBlockSize
+ << ". compressionBlockSize should be set equal to multiply of "
+ "memoryBlockSize";
+ throw std::logic_error(ss.str());
Review Comment:
Maybe we can replace all std::logic_error in CompressionStream with new
exception types. I'll address this issue in my next work item.
--
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]