MCPcopy Create free account
hub / github.com/apache/iotdb-client-go / ReadColumn

Method ReadColumn

client/column_decoder.go:201–226  ·  view source on GitHub ↗
(reader *bytes.Reader, dataType TSDataType, positionCount int32)

Source from the content-addressed store, hash-verified

199}
200
201func (decoder *ByteArrayColumnDecoder) ReadColumn(reader *bytes.Reader, dataType TSDataType, positionCount int32) (Column, error) {
202 // Serialized data layout:
203 // +---------------+-----------------+-------------+
204 // | may have null | null indicators | values |
205 // +---------------+-----------------+-------------+
206 // | byte | list[byte] | list[byte] |
207 // +---------------+-----------------+-------------+
208
209 if dataType != BOOLEAN {
210 return nil, fmt.Errorf("invalid data type: %v", dataType)
211 }
212
213 if positionCount == 0 {
214 return NewBooleanColumn(0, 0, nil, []bool{})
215 }
216
217 nullIndicators, err := deserializeNullIndicators(reader, positionCount)
218 if err != nil {
219 return nil, err
220 }
221 values, err := deserializeBooleanArray(reader, positionCount)
222 if err != nil {
223 return nil, err
224 }
225 return NewBooleanColumn(0, positionCount, nullIndicators, values)
226}
227
228type BinaryArrayColumnDecoder struct {
229 baseColumnDecoder

Callers

nothing calls this directly

Calls 3

NewBooleanColumnFunction · 0.85
deserializeBooleanArrayFunction · 0.85

Tested by

no test coverage detected