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

Function reverseTransformDate32

plugins/destination/duckdb/client/read.go:266–277  ·  view source on GitHub ↗
(arr *array.Timestamp)

Source from the content-addressed store, hash-verified

264}
265
266func reverseTransformDate32(arr *array.Timestamp) arrow.Array {
267 builder := array.NewDate32Builder(memory.DefaultAllocator)
268 for i := 0; i < arr.Len(); i++ {
269 if arr.IsNull(i) {
270 builder.AppendNull()
271 continue
272 }
273 builder.Append(arrow.Date32FromTime(arr.Value(i).ToTime(arrow.Microsecond)))
274 }
275
276 return builder.NewArray()
277}
278
279func reverseTransformDate64(arr *array.Timestamp) arrow.Array {
280 builder := array.NewDate64Builder(memory.DefaultAllocator)

Callers 1

reverseTransformArrayFunction · 0.85

Calls 3

AppendMethod · 0.80
ToTimeMethod · 0.65
ValueMethod · 0.65

Tested by

no test coverage detected