MCPcopy Index your code
hub / github.com/apache/iotdb-client-go / NewRunLengthEncodedColumn

Function NewRunLengthEncodedColumn

client/column.go:657–676  ·  view source on GitHub ↗
(value Column, positionCount int32)

Source from the content-addressed store, hash-verified

655}
656
657func NewRunLengthEncodedColumn(value Column, positionCount int32) (*RunLengthEncodedColumn, error) {
658 if value == nil {
659 return nil, fmt.Errorf("value is null")
660 }
661 if value.GetPositionCount() != 1 {
662 return nil, fmt.Errorf("expected value to contain a single position but has %v positions", value.GetPositionCount())
663 }
664 if positionCount < 0 {
665 return nil, fmt.Errorf("positionCount is negative")
666 }
667 column := new(RunLengthEncodedColumn)
668 switch (value).(type) {
669 case *RunLengthEncodedColumn:
670 column.value = (value.(*RunLengthEncodedColumn)).GetValue()
671 default:
672 column.value = value
673 }
674 column.positionCount = positionCount
675 return column, nil
676}
677
678func (c *RunLengthEncodedColumn) GetValue() Column {
679 return c.value

Callers 1

ReadColumnMethod · 0.85

Calls 2

GetPositionCountMethod · 0.65
GetValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…