pitrou commented on PR #30: URL: https://github.com/apache/iceberg-cpp/pull/30#issuecomment-2750938941
> Good question! IMHO, a streaming JSON reader is an overkill in this case. That's why I propose to define a minimal FileIO like: > > ``` > class FileIO { > public: > virtual expected<void, Error> DeleteFile(const std::string& file_path); > virtual expected<void, Error> WriteFile(const std::string& file_path, const std::string& content, bool overwrite); > virtual expected<std::string, Error> ReadFile(const std::string& file_path, std::optional<size_t> length); > }; > ``` Just FTR, it would be better to use `std::string_view` as much as possible when the data isn't supposed to live past the function call. I'm thinking especially of the `content` argument to `WriteFile`, since it might be big. -- 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