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

Method Open

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

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