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

Function FromParquetSchema

cpp/src/parquet/arrow/schema.cc:1242–1262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1240}
1241
1242Status FromParquetSchema(
1243 const SchemaDescriptor* schema, const ArrowReaderProperties& properties,
1244 const std::shared_ptr<const KeyValueMetadata>& key_value_metadata,
1245 std::shared_ptr<::arrow::Schema>* out) {
1246 SchemaManifest manifest;
1247 RETURN_NOT_OK(SchemaManifest::Make(schema, key_value_metadata, properties, &manifest));
1248 std::vector<std::shared_ptr<Field>> fields(manifest.schema_fields.size());
1249
1250 for (int i = 0; i < static_cast<int>(fields.size()); i++) {
1251 const auto& schema_field = manifest.schema_fields[i];
1252 fields[i] = schema_field.field;
1253 }
1254 if (manifest.origin_schema) {
1255 // ARROW-8980: If the ARROW:schema was in the input metadata, then
1256 // manifest.origin_schema will have it scrubbed out
1257 *out = ::arrow::schema(fields, manifest.origin_schema->metadata());
1258 } else {
1259 *out = ::arrow::schema(fields, key_value_metadata);
1260 }
1261 return Status::OK();
1262}
1263
1264Status FromParquetSchema(const SchemaDescriptor* parquet_schema,
1265 const ArrowReaderProperties& properties,

Callers 9

GetSchemaFunction · 0.85
GetSchemaMethod · 0.85
WriteColumnMethod · 0.85
TYPED_TESTFunction · 0.85
WriteBufferedFileMethod · 0.85
ConvertSchemaMethod · 0.85
RoundTripSchemaMethod · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85

Calls 5

MakeFunction · 0.50
schemaFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45
metadataMethod · 0.45

Tested by 7

WriteColumnMethod · 0.68
TYPED_TESTFunction · 0.68
WriteBufferedFileMethod · 0.68
ConvertSchemaMethod · 0.68
RoundTripSchemaMethod · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68