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

Method Open

cpp/src/parquet/file_reader.cc:778–795  ·  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

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