parseMapType parses a DuckDB MAP type string into an Arrow MapType.
(dbType string)
| 240 | |
| 241 | // parseMapType parses a DuckDB MAP type string into an Arrow MapType. |
| 242 | func parseMapType(dbType string) *arrow.MapType { |
| 243 | inner := extractInnerContent(dbType) |
| 244 | parts := splitTopLevelCommas(inner) |
| 245 | if len(parts) != 2 { |
| 246 | return arrow.MapOf(arrow.BinaryTypes.String, arrow.BinaryTypes.String) |
| 247 | } |
| 248 | keyType := DuckDBTypeToArrow(parts[0]) |
| 249 | valueType := DuckDBTypeToArrow(parts[1]) |
| 250 | return arrow.MapOf(keyType, valueType) |
| 251 | } |
| 252 | |
| 253 | // parseDecimalParams extracts precision and scale from a type name like "DECIMAL(18,2)". |
| 254 | func parseDecimalParams(typeName string) (precision, scale int) { |
no test coverage detected