Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++][FS][Azure] Add support for reading user defined metadata #40670

Closed
kou opened this issue Mar 19, 2024 · 2 comments
Closed

[C++][FS][Azure] Add support for reading user defined metadata #40670

kou opened this issue Mar 19, 2024 · 2 comments

Comments

@kou
Copy link
Member

kou commented Mar 19, 2024

Describe the enhancement requested

We've implemented ReadMetadata() by #38330.
It uses properties not user defined metadata. But our generic test has a test that writes/reads user defined metadata:

// Storing metadata along file
auto metadata = KeyValueMetadata::Make({"Content-Type", "Content-Language"},
{"x-arrow/filesystem-test", "fr_FR"});
ASSERT_OK_AND_ASSIGN(stream, fs->OpenOutputStream("jkl", metadata));
ASSERT_OK(stream->Write("data"));
ASSERT_OK(stream->Close());
ASSERT_OK_AND_ASSIGN(auto input, fs->OpenInputStream("jkl"));
ASSERT_OK_AND_ASSIGN(auto got_metadata, input->ReadMetadata());
if (have_file_metadata()) {
ASSERT_NE(got_metadata, nullptr);
ASSERT_GE(got_metadata->size(), 2);
ASSERT_OK_AND_EQ("x-arrow/filesystem-test", got_metadata->Get("Content-Type"));
} else {
if (got_metadata) {
ASSERT_EQ(got_metadata->size(), 0);
}
}

Component(s)

C++

@Tom-Newton
Copy link
Contributor

I think this duplicates #40026

@kou
Copy link
Member Author

kou commented Mar 20, 2024

Oh, sorry.

@kou kou closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants