Determines if the |schema_field|'s root ancestor is nullable.
| 97 | |
| 98 | // Determines if the |schema_field|'s root ancestor is nullable. |
| 99 | bool HasNullableRoot(const SchemaManifest& schema_manifest, |
| 100 | const SchemaField* schema_field) { |
| 101 | DCHECK(schema_field != nullptr); |
| 102 | const SchemaField* current_field = schema_field; |
| 103 | bool nullable = schema_field->field->nullable(); |
| 104 | while (current_field != nullptr) { |
| 105 | nullable = current_field->field->nullable(); |
| 106 | current_field = schema_manifest.GetParent(current_field); |
| 107 | } |
| 108 | return nullable; |
| 109 | } |
| 110 | |
| 111 | Status GetSchemaMetadata(const ::arrow::Schema& schema, ::arrow::MemoryPool* pool, |
| 112 | const ArrowWriterProperties& properties, |