MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / transformTypeForWriting

Function transformTypeForWriting

plugins/destination/duckdb/client/types.go:31–42  ·  view source on GitHub ↗
(dt arrow.DataType)

Source from the content-addressed store, hash-verified

29}
30
31func 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
44func arrowToDuckDB(dt arrow.DataType) string {
45 switch dt := dt.(type) {

Callers 2

transformArrayFunction · 0.85

Calls 2

duckDBToArrowFunction · 0.85
arrowToDuckDBFunction · 0.85

Tested by

no test coverage detected