| 181 | |
| 182 | struct SchemaExporter { |
| 183 | Status ExportField(const Field& field) { |
| 184 | export_.name_ = field.name(); |
| 185 | flags_ = field.nullable() ? ARROW_FLAG_NULLABLE : 0; |
| 186 | |
| 187 | const DataType* type = UnwrapExtension(field.type().get()); |
| 188 | RETURN_NOT_OK(ExportFormat(*type)); |
| 189 | RETURN_NOT_OK(ExportChildren(type->fields())); |
| 190 | RETURN_NOT_OK(ExportMetadata(field.metadata().get())); |
| 191 | return Status::OK(); |
| 192 | } |
| 193 | |
| 194 | Status ExportType(const DataType& orig_type) { |
| 195 | flags_ = ARROW_FLAG_NULLABLE; |