bkietz commented on a change in pull request #9685:
URL: https://github.com/apache/arrow/pull/9685#discussion_r594520833
##########
File path: cpp/src/arrow/dataset/file_base.cc
##########
@@ -56,6 +57,32 @@ Result<std::shared_ptr<io::RandomAccessFile>>
FileSource::Open() const {
return custom_open_();
}
+Result<std::shared_ptr<io::InputStream>> FileSource::OpenCompressed(
+ util::optional<Compression::type> compression) const {
+ ARROW_ASSIGN_OR_RAISE(auto file, Open());
+ auto actual_compression = Compression::type::UNCOMPRESSED;
+ if (!compression.has_value()) {
+ // Guess compression from file extension
Review comment:
This can be made more compact with
arrow::fs::internal::GetAbstractPathExtension and
arrow::util::GetCompressionType
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]