From d4dd4f1eec36749064f8d0cd1ead70903030c63e Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 28 Mar 2024 13:28:45 +0900 Subject: [PATCH] Revert have_default_file_metadata() We've implemented file metadata for Azure Filesystem. --- cpp/src/arrow/filesystem/azurefs_test.cc | 3 +-- cpp/src/arrow/filesystem/test_util.cc | 6 +----- cpp/src/arrow/filesystem/test_util.h | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cpp/src/arrow/filesystem/azurefs_test.cc b/cpp/src/arrow/filesystem/azurefs_test.cc index 61cf2b86bbbea..4edd8cadd422b 100644 --- a/cpp/src/arrow/filesystem/azurefs_test.cc +++ b/cpp/src/arrow/filesystem/azurefs_test.cc @@ -382,8 +382,7 @@ class TestAzureFileSystemGeneric : public ::testing::Test, public GenericFileSys bool allow_append_to_file() const override { return true; } bool have_directory_mtimes() const override { return false; } bool have_flaky_directory_tree_deletion() const override { return false; } - bool have_file_metadata() const override { return false; } - bool have_default_file_metadata() const override { return true; } + bool have_file_metadata() const override { return true; } std::shared_ptr azure_fs_; std::shared_ptr fs_; diff --git a/cpp/src/arrow/filesystem/test_util.cc b/cpp/src/arrow/filesystem/test_util.cc index bf3431cd83a0d..4022413af96fb 100644 --- a/cpp/src/arrow/filesystem/test_util.cc +++ b/cpp/src/arrow/filesystem/test_util.cc @@ -926,11 +926,7 @@ void GenericFileSystemTest::TestOpenOutputStream(FileSystem* fs) { ASSERT_OK_AND_EQ("x-arrow/filesystem-test", got_metadata->Get("Content-Type")); } else { if (got_metadata) { - if (have_default_file_metadata()) { - ASSERT_GT(got_metadata->size(), 0); - } else { - ASSERT_EQ(got_metadata->size(), 0); - } + ASSERT_EQ(got_metadata->size(), 0); } } diff --git a/cpp/src/arrow/filesystem/test_util.h b/cpp/src/arrow/filesystem/test_util.h index c1922cf0b618f..242867ce3afce 100644 --- a/cpp/src/arrow/filesystem/test_util.h +++ b/cpp/src/arrow/filesystem/test_util.h @@ -184,8 +184,6 @@ class ARROW_TESTING_EXPORT GenericFileSystemTest { virtual bool have_flaky_directory_tree_deletion() const { return false; } // - Whether the filesystem stores some metadata alongside files virtual bool have_file_metadata() const { return false; } - // - Whether the filesystem returns some default metadata alongside files - virtual bool have_default_file_metadata() const { return false; } void TestEmpty(FileSystem* fs); void TestNormalizePath(FileSystem* fs);