Documentation ¶
Index ¶
- Constants
- type Column
- func (c *Column) AppendDuration(dur types.Duration)
- func (c *Column) AppendJSON(j json.BinaryJSON)
- func (c *Column) AppendMyDecimal(dec *types.MyDecimal)
- func (c *Column) AppendSet(set types.Set)
- func (c *Column) CopyConstruct(dst *Column) *Column
- func (c *Column) IsNull(rowIdx int) bool
- func (c *Column) Reset(eType types.EvalType)
- type Row
- func (r Row) GetBytes(colIdx int) []byte
- func (r Row) GetDatum(colIdx int, tp *types.FieldType) types.Datum
- func (r Row) GetDatumRow(fields []*types.FieldType) []types.Datum
- func (r Row) GetDuration(colIdx int, fillFsp int) types.Duration
- func (r Row) GetEnum(colIdx int) types.Enum
- func (r Row) GetFloat32(colIdx int) float32
- func (r Row) GetFloat64(colIdx int) float64
- func (r Row) GetInt64(colIdx int) int64
- func (r Row) GetJSON(colIdx int) json.BinaryJSON
- func (r Row) GetMyDecimal(colIdx int) *types.MyDecimal
- func (r Row) GetSet(colIdx int) types.Set
- func (r Row) GetString(colIdx int) string
- func (r Row) GetTime(colIdx int) types.Time
- func (r Row) GetUint64(colIdx int) uint64
- func (r Row) Idx() int
- func (r Row) IsEmpty() bool
- func (r Row) Len() int
- func (r Row) Soliton() *Soliton
- type Soliton
Constants ¶
const ( InitialCapacity = 32 ZeroCapacity = 0 )
Capacity constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
Column stores one column of data in Apache Arrow format. See https://arrow.apache.org/docs/memory_layout.html
func (*Column) AppendDuration ¶
func (c *Column) AppendDuration(dur types.Duration)
AppendDuration appends a duration value into this Column.
func (*Column) AppendJSON ¶
func (c *Column) AppendJSON(j json.BinaryJSON)
AppendJSON appends a BinaryJSON value into this Column.
func (*Column) AppendMyDecimal ¶
func (c *Column) AppendMyDecimal(dec *types.MyDecimal)
AppendMyDecimal appends a MyDecimal value into this Column.
func (*Column) AppendSet ¶
func (c *Column) AppendSet(set types.Set)
AppendSet appends a Set value into this Column.
func (*Column) CopyConstruct ¶
CopyConstruct copies this Column to dst. If dst is nil, it creates a new Column and returns it.
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row represents a row of data, can be used to access values.
func (Row) GetDatumRow ¶
func (r Row) GetDatumRow(fields []*types.FieldType) []types.Datum
GetDatumRow converts soliton.Row to types.DatumRow. Keep in mind that GetDatumRow has a reference to r.c, which is a soliton, this function works only if the underlying soliton is valid or unchanged.
func (Row) GetDuration ¶
GetDuration returns the Duration value with the colIdx.
func (Row) GetFloat32 ¶
GetFloat32 returns the float32 value with the colIdx.
func (Row) GetFloat64 ¶
GetFloat64 returns the float64 value with the colIdx.
func (Row) GetMyDecimal ¶
GetMyDecimal returns the MyDecimal value with the colIdx.
type Soliton ¶
type Soliton struct {
// contains filtered or unexported fields
}
Soliton stores multiple rows of data in Apache Arrow format. See https://arrow.apache.org/docs/memory_layout.html Values are appended in compact format and can be directly accessed without decoding. When the soliton is done processing, we can reuse the allocated memory by resetting it.
func New ¶
New creates a new soliton.
cap: the limit for the max number of rows. maxSolitonsize: the max limit for the number of rows.
func NewSolitonWithCapacity ¶
NewSolitonWithCapacity creates a new soliton with field types and capacity.
func Renew ¶
Renew creates a new Soliton based on an existing Soliton. The newly created Soliton has the same data schema with the old Soliton. The capacity of the new Soliton might be doubled based on the capacity of the old Soliton and the maxSolitonsize.
chk: old soliton(often used in previous call). maxSolitonsize: the limit for the max number of rows.