This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch orc
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/orc by this push:
new 380df033 [Feature] Add `beforeReadStripe()` interface in `InputStream`
class. (#75)
380df033 is described below
commit 380df03331c12fa4095dd2613eb5f08ad541eb3e
Author: Qi Chen <[email protected]>
AuthorDate: Thu May 25 20:42:21 2023 +0800
[Feature] Add `beforeReadStripe()` interface in `InputStream` class. (#75)
---
c++/include/orc/OrcFile.hh | 3 +++
c++/src/Reader.cc | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/c++/include/orc/OrcFile.hh b/c++/include/orc/OrcFile.hh
index 455a3f72..c52b66b7 100644
--- a/c++/include/orc/OrcFile.hh
+++ b/c++/include/orc/OrcFile.hh
@@ -62,6 +62,9 @@ namespace orc {
* Get the name of the stream for error messages.
*/
virtual const std::string& getName() const = 0;
+
+ virtual void beforeReadStripe(std::unique_ptr<StripeInformation>
currentStripeInformation,
+ std::vector<bool> selectedColumns);
};
/**
diff --git a/c++/src/Reader.cc b/c++/src/Reader.cc
index c132e467..485b874a 100644
--- a/c++/src/Reader.cc
+++ b/c++/src/Reader.cc
@@ -1120,6 +1120,13 @@ namespace orc {
rowsInCurrentStripe = currentStripeInfo.numberofrows();
processingStripe = currentStripe;
+ std::unique_ptr<StripeInformation> currentStripeInformation(new
StripeInformationImpl(
+ currentStripeInfo.offset(), currentStripeInfo.indexlength(),
+ currentStripeInfo.datalength(), currentStripeInfo.footerlength(),
+ currentStripeInfo.numberofrows(), contents->stream.get(),
*contents->pool,
+ contents->compression, contents->blockSize,
contents->readerMetrics));
+ contents->stream->beforeReadStripe(std::move(currentStripeInformation),
selectedColumns);
+
if (sargsApplier) {
bool isStripeNeeded = true;
if (contents->metadata) {
@@ -1649,4 +1656,7 @@ namespace orc {
// PASS
};
+ void InputStream::beforeReadStripe(std::unique_ptr<StripeInformation>
currentStripeInformation,
+ std::vector<bool> selectedColumns) {}
+
} // namespace orc
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]