MCPcopy Create free account
hub / github.com/brimdata/super / NewBuilder

Function NewBuilder

vector/builder.go:52–103  ·  view source on GitHub ↗
(typ super.Type)

Source from the content-addressed store, hash-verified

50}
51
52func NewBuilder(typ super.Type) Builder {
53 switch typ := typ.(type) {
54 case *super.TypeOfUint8,
55 *super.TypeOfUint16,
56 *super.TypeOfUint32,
57 *super.TypeOfUint64:
58 return &uintBuilder{typ: typ}
59 case *super.TypeOfInt8,
60 *super.TypeOfInt16,
61 *super.TypeOfInt32,
62 *super.TypeOfInt64,
63 *super.TypeOfDuration,
64 *super.TypeOfTime:
65 return &intBuilder{typ: typ}
66 case *super.TypeOfFloat16,
67 *super.TypeOfFloat32,
68 *super.TypeOfFloat64:
69 return &floatBuilder{typ: typ}
70 case *super.TypeOfBool:
71 return newBoolBuilder()
72 case *super.TypeOfBytes,
73 *super.TypeOfString:
74 return newBytesStringTypeBuilder(typ)
75 case *super.TypeOfIP:
76 return &ipBuilder{}
77 case *super.TypeOfNet:
78 return &netBuilder{}
79 case *super.TypeOfType:
80 return newBytesStringTypeBuilder(typ)
81 case *super.TypeOfNull:
82 return &nullBuilder{}
83 case *super.TypeRecord:
84 return newRecordBuilder(typ)
85 case *super.TypeArray:
86 return newArraySetBuilder(typ)
87 case *super.TypeSet:
88 return newArraySetBuilder(typ)
89 case *super.TypeMap:
90 return newMapBuilder(typ)
91 case *super.TypeUnion:
92 return newUnionBuilder(typ)
93 case *super.TypeFusion:
94 return newFusionBuilder(typ)
95 case *super.TypeEnum:
96 return &enumBuilder{typ, nil}
97 case *super.TypeError:
98 return &errorBuilder{typ: typ, Builder: NewBuilder(typ.Type)}
99 case *super.TypeNamed:
100 return &namedBuilder{typ: typ, Builder: NewBuilder(typ.Type)}
101 }
102 panic(typ)
103}
104
105type namedBuilder struct {
106 Builder

Callers 10

mergeSameTypeVecsFunction · 0.92
evalMethod · 0.92
materializeKeyMethod · 0.92
WriteMethod · 0.92
WriteMethod · 0.70
newRecordBuilderFunction · 0.70
newArraySetBuilderFunction · 0.70
newMapBuilderFunction · 0.70
newUnionBuilderFunction · 0.70
newFusionBuilderFunction · 0.70

Calls 7

newBoolBuilderFunction · 0.85
newRecordBuilderFunction · 0.85
newArraySetBuilderFunction · 0.85
newMapBuilderFunction · 0.85
newUnionBuilderFunction · 0.85
newFusionBuilderFunction · 0.85

Tested by

no test coverage detected