(dt arrow.DataType)
| 29 | } |
| 30 | |
| 31 | func transformTypeForWriting(dt arrow.DataType) arrow.DataType { |
| 32 | switch dt := dt.(type) { |
| 33 | case *arrow.StructType, *arrow.MapType: |
| 34 | return arrow.BinaryTypes.String |
| 35 | case arrow.ListLikeType: |
| 36 | return arrow.ListOf(transformTypeForWriting(dt.Elem())) |
| 37 | case *types.UUIDType, *types.JSONType: |
| 38 | return arrow.BinaryTypes.String |
| 39 | default: |
| 40 | return duckDBToArrow(arrowToDuckDB(dt)) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func arrowToDuckDB(dt arrow.DataType) string { |
| 45 | switch dt := dt.(type) { |
no test coverage detected