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

Method arrowTypeToSqlite

plugins/destination/sqlite/client/types.go:25–39  ·  view source on GitHub ↗
(t arrow.DataType)

Source from the content-addressed store, hash-verified

23}
24
25func (*Client) arrowTypeToSqlite(t arrow.DataType) arrow.DataType {
26 switch t.ID() {
27 case arrow.INT8, arrow.INT16, arrow.INT32, arrow.INT64, arrow.UINT8, arrow.UINT16, arrow.UINT32, arrow.UINT64:
28 return arrow.PrimitiveTypes.Int64
29 case arrow.FLOAT16, arrow.FLOAT32, arrow.FLOAT64:
30 return arrow.PrimitiveTypes.Float64
31 case arrow.BOOL:
32 return arrow.FixedWidthTypes.Boolean
33 case arrow.TIMESTAMP:
34 return arrow.FixedWidthTypes.Timestamp_us
35 // case arrow.BINARY, arrow.LARGE_BINARY, arrow.STRING, arrow.LARGE_STRING:
36 default:
37 return arrow.BinaryTypes.LargeString
38 }
39}
40
41func (*Client) sqliteTypeToArrowType(t string) arrow.DataType {
42 switch t {

Callers 1

normalizeFieldMethod · 0.95

Calls 1

IDMethod · 0.45

Tested by

no test coverage detected