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

Method Open

cpp/src/parquet/file_reader.cc:775–792  ·  view source on GitHub ↗

Open the file. If no metadata is passed, it is parsed from the footer of the file

Source from the content-addressed store, hash-verified

773// Open the file. If no metadata is passed, it is parsed from the footer of
774// the file
775std::unique_ptr<ParquetFileReader::Contents> ParquetFileReader::Contents::Open(
776 std::shared_ptr<ArrowInputFile> source, const ReaderProperties& props,
777 std::shared_ptr<FileMetaData> metadata) {
778 std::unique_ptr<ParquetFileReader::Contents> result(
779 new SerializedFile(std::move(source), props));
780
781 // Access private methods here, but otherwise unavailable
782 SerializedFile* file = static_cast<SerializedFile*>(result.get());
783
784 if (metadata == nullptr) {
785 // Validates magic bytes, parses metadata, and initializes the SchemaDescriptor
786 file->ParseMetaData();
787 } else {
788 file->set_metadata(std::move(metadata));
789 }
790
791 return result;
792}
793
794Future<std::unique_ptr<ParquetFileReader::Contents>>
795ParquetFileReader::Contents::OpenAsync(std::shared_ptr<ArrowInputFile> source,

Callers 1

OpenAsyncMethod · 0.45

Calls 3

ParseMetaDataMethod · 0.80
set_metadataMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected