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

Function FromParquetSchema

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

Source from the content-addressed store, hash-verified

1251}
1252
1253Status FromParquetSchema(
1254 const SchemaDescriptor* schema, const ArrowReaderProperties& properties,
1255 const std::shared_ptr<const KeyValueMetadata>& key_value_metadata,
1256 std::shared_ptr<::arrow::Schema>* out) {
1257 SchemaManifest manifest;
1258 RETURN_NOT_OK(SchemaManifest::Make(schema, key_value_metadata, properties, &manifest));
1259 std::vector<std::shared_ptr<Field>> fields(manifest.schema_fields.size());
1260
1261 for (int i = 0; i < static_cast<int>(fields.size()); i++) {
1262 const auto& schema_field = manifest.schema_fields[i];
1263 fields[i] = schema_field.field;
1264 }
1265 if (manifest.origin_schema) {
1266 // ARROW-8980: If the ARROW:schema was in the input metadata, then
1267 // manifest.origin_schema will have it scrubbed out
1268 *out = ::arrow::schema(fields, manifest.origin_schema->metadata());
1269 } else {
1270 *out = ::arrow::schema(fields, key_value_metadata);
1271 }
1272 return Status::OK();
1273}
1274
1275Status FromParquetSchema(const SchemaDescriptor* parquet_schema,
1276 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