| 489 | } |
| 490 | |
| 491 | void GroupNode::ToParquet(void* opaque_element) const { |
| 492 | format::SchemaElement* element = static_cast<format::SchemaElement*>(opaque_element); |
| 493 | element->__set_name(name_); |
| 494 | element->__set_num_children(field_count()); |
| 495 | element->__set_repetition_type(ToThrift(repetition_)); |
| 496 | if (converted_type_ != ConvertedType::NONE) { |
| 497 | element->__set_converted_type(ToThrift(converted_type_)); |
| 498 | } |
| 499 | if (field_id_ >= 0) { |
| 500 | element->__set_field_id(field_id_); |
| 501 | } |
| 502 | if (logical_type_ && logical_type_->is_serialized()) { |
| 503 | element->__set_logicalType(logical_type_->ToThrift()); |
| 504 | } |
| 505 | return; |
| 506 | } |
| 507 | |
| 508 | void PrimitiveNode::ToParquet(void* opaque_element) const { |
| 509 | format::SchemaElement* element = static_cast<format::SchemaElement*>(opaque_element); |