jinchengchenghh commented on code in PR #7897:
URL: https://github.com/apache/incubator-gluten/pull/7897#discussion_r1837316455
##########
cpp/velox/shuffle/VeloxShuffleReader.h:
##########
@@ -85,7 +86,50 @@ class VeloxSortShuffleReaderDeserializer final : public
ColumnarBatchIterator {
void readLargeRow(std::vector<std::shared_ptr<arrow::Buffer>>& arrowBuffers);
- std::shared_ptr<arrow::io::InputStream> in_;
+ void reachEos();
+
+ class TimedInputStream final : public arrow::io::InputStream {
+ public:
+ TimedInputStream(std::shared_ptr<arrow::io::InputStream> in) :
in_(std::move(in)) {}
+
+ arrow::Status Close() override {
+ if (closed_) {
+ return arrow::Status::OK();
+ }
+ RETURN_NOT_OK(in_->Close());
+ closed_ = true;
+ return arrow::Status::OK();
+ }
+
+ arrow::Result<int64_t> Tell() const override {
+ return in_->Tell();
+ }
+
+ bool closed() const override {
+ return closed_;
+ }
+
+ arrow::Result<int64_t> Read(int64_t nbytes, void* out) override {
+ ScopedTimer timer(&readStreamTime_);
+ return in_->Read(nbytes, out);
+ }
+
+ arrow::Result<std::shared_ptr<arrow::Buffer>> Read(int64_t nbytes)
override {
+ ScopedTimer timer(&readStreamTime_);
+ return in_->Read(nbytes);
+ }
+
+ int64_t readStreamTime() const {
+ return readStreamTime_;
+ }
+
+ private:
+ std::shared_ptr<arrow::io::InputStream> in_;
Review Comment:
const
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]