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

Function ToParquetSchema

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

Source from the content-addressed store, hash-verified

1227}
1228
1229Status ToParquetSchema(const ::arrow::Schema* arrow_schema,
1230 const WriterProperties& properties,
1231 const ArrowWriterProperties& arrow_properties,
1232 std::shared_ptr<SchemaDescriptor>* out) {
1233 std::vector<NodePtr> nodes(arrow_schema->num_fields());
1234 for (int i = 0; i < arrow_schema->num_fields(); i++) {
1235 RETURN_NOT_OK(
1236 FieldToNode(arrow_schema->field(i), properties, arrow_properties, &nodes[i]));
1237 }
1238
1239 NodePtr schema = GroupNode::Make("schema", Repetition::REQUIRED, nodes);
1240 *out = std::make_shared<::parquet::SchemaDescriptor>();
1241 PARQUET_CATCH_NOT_OK((*out)->Init(schema));
1242
1243 return Status::OK();
1244}
1245
1246Status ToParquetSchema(const ::arrow::Schema* arrow_schema,
1247 const WriterProperties& properties,

Callers 10

WriteFileMethod · 0.85
TESTFunction · 0.85
WriteColumnMethod · 0.85
WriteFileMethod · 0.85
TEST_FFunction · 0.85
ConvertSchemaMethod · 0.85
RoundTripSchemaMethod · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
OpenMethod · 0.85

Calls 7

FieldToNodeFunction · 0.85
MakeFunction · 0.50
OKFunction · 0.50
num_fieldsMethod · 0.45
fieldMethod · 0.45
InitMethod · 0.45

Tested by 9

WriteFileMethod · 0.68
TESTFunction · 0.68
WriteColumnMethod · 0.68
WriteFileMethod · 0.68
TEST_FFunction · 0.68
ConvertSchemaMethod · 0.68
RoundTripSchemaMethod · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68