parseStructType parses a DuckDB STRUCT type string into an Arrow StructType.
(dbType string)
| 221 | |
| 222 | // parseStructType parses a DuckDB STRUCT type string into an Arrow StructType. |
| 223 | func parseStructType(dbType string) *arrow.StructType { |
| 224 | inner := extractInnerContent(dbType) |
| 225 | parts := splitTopLevelCommas(inner) |
| 226 | fields := make([]arrow.Field, 0, len(parts)) |
| 227 | for _, part := range parts { |
| 228 | name, typ := parseStructFieldDef(part) |
| 229 | if name == "" { |
| 230 | continue |
| 231 | } |
| 232 | fields = append(fields, arrow.Field{ |
| 233 | Name: name, |
| 234 | Type: DuckDBTypeToArrow(typ), |
| 235 | Nullable: true, |
| 236 | }) |
| 237 | } |
| 238 | return arrow.StructOf(fields...) |
| 239 | } |
| 240 | |
| 241 | // parseMapType parses a DuckDB MAP type string into an Arrow MapType. |
| 242 | func parseMapType(dbType string) *arrow.MapType { |
no test coverage detected