ArianaVillegas commented on code in PR #12625:
URL: https://github.com/apache/arrow/pull/12625#discussion_r864922730
##########
cpp/src/arrow/engine/substrait/serde_test.cc:
##########
@@ -654,7 +655,8 @@ TEST(Substrait, ReadRel) {
ASSERT_EQ(scan_node_options.dataset->type_name(), "filesystem");
const auto& dataset =
checked_cast<const
dataset::FileSystemDataset&>(*scan_node_options.dataset);
- EXPECT_THAT(dataset.files(), ElementsAre("/tmp/dat1.parquet",
"/tmp/dat2.parquet"));
+ EXPECT_THAT(dataset.files(),
+ UnorderedElementsAre("/tmp/dat1.parquet", "/tmp/dat2.parquet"));
EXPECT_EQ(dataset.format()->type_name(), "parquet");
EXPECT_EQ(*dataset.schema(), Schema({field("i", int64()), field("b",
boolean())}));
}
Review Comment:
`GetGlobFiles` can be called from filesystem tests, in specific, local
filesystem tests, and it'd look something like this:
```
TYPED_TEST(TestLocalFS, GetGlobFiles) {
ASSERT_OK(this->fs_->CreateDir("AB/CD"));
CreateFile(this->fs_.get(), "AB/CD/a.txt", "data");
CreateFile(this->fs_.get(), "AB/CD/ab.txt", "data");
CreateFile(this->fs_.get(), "AB/CD/abc.txt", "data");
std::vector<FileInfo> infos;
ASSERT_OK_AND_ASSIGN(infos, GetGlobFiles(this->fs_.get(),
"AB/CD/*b*.txt"));
ASSERT_EQ(infos.size(), 2);
AssertFileInfo(infos[0], "AB/CD/ab.txt", FileType::File, 4);
AssertFileInfo(infos[1], "AB/CD/abc.txt", FileType::File, 4);
}
```
--
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]