pitrou commented on issue #2: URL: https://github.com/apache/iceberg-cpp/issues/2#issuecomment-2527410151
> I'd like to hear more of this. Perhaps a naive example to demonstrate it? I was thinking something like this. But I'm not an Iceberg expert at all. ```c++ struct FileOpenRequest { std::string path; FileInfo info; }; struct FileOpenResult { std::any file_handle; }; struct ReadRangeRequest { std::any file_handle; // corresponds to FileOpenRequest::file_handle int64_t offset, length; }; struct ReadRangeResult { std::shared_ptr<Buffer> data; }; struct IoRequest { std::any handle; std::variant<FileOpenRequest, ReadRangeRequest> op; }; struct IoResult { std::any handle; // corresponds to IoRequest::handle std::variant<FileOpenResult, ReadRangeResult> op; }; class IcebergReader { public: // Ask the reader which IOs are needed to move forward std::vector<IoRequest> NeedIo(); // Instruct the reader about these IO results void IoReceived(std::vector<IoResult>); // Optional - IOs which may be needed in the future std::vector<IoRequest> SpeculatedIo(); }; ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org