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

Function reverseTransformStruct

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

Source from the content-addressed store, hash-verified

209}
210
211func reverseTransformStruct(dt *arrow.StructType, arr *array.Binary) arrow.Array {
212 bldr := array.NewStructBuilder(memory.DefaultAllocator, dt)
213 defer bldr.Release()
214 for i := 0; i < arr.Len(); i++ {
215 if arr.IsNull(i) {
216 bldr.AppendNull()
217 continue
218 }
219 if err := bldr.AppendValueFromString(arr.ValueString(i)); err != nil {
220 panic(err)
221 }
222 }
223 return bldr.NewStructArray()
224}
225
226func reverseTransformMap(dt *arrow.MapType, arr *array.Binary) arrow.Array {
227 bldr := array.NewMapBuilder(memory.DefaultAllocator, dt.KeyType(), dt.ItemType(), dt.KeysSorted)

Callers 1

reverseTransformArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected