MCPcopy Create free account
hub / github.com/apache/arrow / ArrowMetadataToCommitBlockListOptions

Function ArrowMetadataToCommitBlockListOptions

cpp/src/arrow/filesystem/azurefs.cc:774–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772}
773
774void ArrowMetadataToCommitBlockListOptions(
775 const std::shared_ptr<const KeyValueMetadata>& arrow_metadata,
776 Blobs::CommitBlockListOptions& options) {
777 using ::arrow::internal::AsciiEqualsCaseInsensitive;
778 for (auto& [key, value] : arrow_metadata->sorted_pairs()) {
779 if (AsciiEqualsCaseInsensitive(key, "Content-Type")) {
780 options.HttpHeaders.ContentType = value;
781 } else if (AsciiEqualsCaseInsensitive(key, "Content-Encoding")) {
782 options.HttpHeaders.ContentEncoding = value;
783 } else if (AsciiEqualsCaseInsensitive(key, "Content-Language")) {
784 options.HttpHeaders.ContentLanguage = value;
785 } else if (AsciiEqualsCaseInsensitive(key, "Content-Hash")) {
786 // Ignore: auto-generated value
787 } else if (AsciiEqualsCaseInsensitive(key, "Content-Disposition")) {
788 options.HttpHeaders.ContentDisposition = value;
789 } else if (AsciiEqualsCaseInsensitive(key, "Cache-Control")) {
790 options.HttpHeaders.CacheControl = value;
791 } else {
792 options.Metadata[key] = value;
793 }
794 }
795}
796
797class ObjectInputFile final : public io::RandomAccessFile {
798 public:

Callers 1

ObjectAppendStreamMethod · 0.85

Calls 2

sorted_pairsMethod · 0.80

Tested by

no test coverage detected