westonpace commented on code in PR #33674:
URL: https://github.com/apache/arrow/pull/33674#discussion_r1156481500
##########
cpp/src/arrow/dataset/partition_test.cc:
##########
@@ -189,6 +189,12 @@ TEST_F(TestPartitioning, Partition) {
expected_expressions);
}
+TEST_F(TestPartitioning, DefaultPartitioningIsDirectoryPartitioning) {
+ auto partitioning = Partitioning::Default();
+ ASSERT_EQ(partitioning->type_name(), "directory");
+ AssertSchemaEqual(partitioning->schema(), schema({}));
+}
+
Review Comment:
Can you also add a test to verify directory partitioning works with an empty
schema?
```
TEST_F(TestPartitioning, DirectoryPartitioningEmpty) {
partitioning_ = std::make_shared<DirectoryPartitioning>(schema({}));
written_schema_ = partitioning_->schema();
// No partitioning info
AssertParse("", literal(true));
// Files can be in subdirectories
AssertParse("/foo/", literal(true));
// Partitioning info is discarded on write
AssertFormat(equal(field_ref("alpha"), literal(7)), "");
}
```
--
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]