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

Function reverseTransformMap

plugins/destination/duckdb/client/read.go:226–239  ·  view source on GitHub ↗
(dt *arrow.MapType, arr *array.Binary)

Source from the content-addressed store, hash-verified

224}
225
226func reverseTransformMap(dt *arrow.MapType, arr *array.Binary) arrow.Array {
227 bldr := array.NewMapBuilder(memory.DefaultAllocator, dt.KeyType(), dt.ItemType(), dt.KeysSorted)
228 defer bldr.Release()
229 for i := 0; i < arr.Len(); i++ {
230 if arr.IsNull(i) {
231 bldr.AppendNull()
232 continue
233 }
234 if err := bldr.AppendValueFromString(arr.ValueString(i)); err != nil {
235 panic(err)
236 }
237 }
238 return bldr.NewMapArray()
239}
240func reverseTransformUint8(arr *array.Uint32) arrow.Array {
241 builder := array.NewUint8Builder(memory.DefaultAllocator)
242 for i := 0; i < arr.Len(); i++ {

Callers 1

reverseTransformArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected