Skip to content

Commit d459208

Browse files
author
nullccxsy
committed
feat: correct return type of ArrowFileSystemFileIO functions( MakeMockFileIO, MakeLocalFileIO )
1 parent cdfc616 commit d459208

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/iceberg/arrow/arrow_fs_file_io.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ Status ArrowFileSystemFileIO::DeleteFile(const std::string& file_location) {
6969
return {};
7070
}
7171

72-
std::unique_ptr<::arrow::fs::FileSystem> ArrowFileSystemFileIO::MakeMockFileIO() {
73-
return std::make_unique<::arrow::fs::internal::MockFileSystem>(
74-
std::chrono::system_clock::now());
72+
73+
std::unique_ptr<FileIO> ArrowFileSystemFileIO::MakeMockFileIO() {
74+
return std::make_unique<ArrowFileSystemFileIO>(
75+
std::make_shared<::arrow::fs::internal::MockFileSystem>(std::chrono::system_clock::now()));
7576
}
7677

77-
std::unique_ptr<::arrow::fs::FileSystem> ArrowFileSystemFileIO::MakeLocalFileIO() {
78-
return std::make_unique<::arrow::fs::LocalFileSystem>();
78+
std::unique_ptr<FileIO> ArrowFileSystemFileIO::MakeLocalFileIO() {
79+
return std::make_unique<ArrowFileSystemFileIO>(
80+
std::make_shared<::arrow::fs::LocalFileSystem>());
7981
}
8082

8183
} // namespace iceberg::arrow

0 commit comments

Comments
 (0)