createTableNameSchema creates a minimal Arrow schema containing only table metadata This schema can be processed through the same transformation pipeline as MigrateTable
(tableName string)
| 831 | // createTableNameSchema creates a minimal Arrow schema containing only table metadata |
| 832 | // This schema can be processed through the same transformation pipeline as MigrateTable |
| 833 | func createTableNameSchema(tableName string) *arrow.Schema { |
| 834 | md := arrow.NewMetadata([]string{schema.MetadataTableName}, []string{tableName}) |
| 835 | |
| 836 | // Create a minimal schema with one dummy string field |
| 837 | return arrow.NewSchema( |
| 838 | []arrow.Field{ |
| 839 | {Name: "_dummy", Type: arrow.BinaryTypes.String}, |
| 840 | }, |
| 841 | &md, |
| 842 | ) |
| 843 | } |
| 844 | |
| 845 | // getTransformedTableNameFromSchema extracts the table name from a transformed schema |
| 846 | func getTransformedTableNameFromSchema(transformedSchemaBytes []byte) (string, error) { |