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

Function reverseTransformDate64

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

Source from the content-addressed store, hash-verified

277}
278
279func reverseTransformDate64(arr *array.Timestamp) arrow.Array {
280 builder := array.NewDate64Builder(memory.DefaultAllocator)
281 for i := 0; i < arr.Len(); i++ {
282 if arr.IsNull(i) {
283 builder.AppendNull()
284 continue
285 }
286 builder.Append(arrow.Date64FromTime(arr.Value(i).ToTime(arrow.Microsecond)))
287 }
288
289 return builder.NewArray()
290}

Callers 1

reverseTransformArrayFunction · 0.85

Calls 3

AppendMethod · 0.80
ToTimeMethod · 0.65
ValueMethod · 0.65

Tested by

no test coverage detected