chunk

package
v1.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	// contains filtered or unexported fields
}

Chunk 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 chunk is done processing, we can reuse the allocated memory by resetting it.

func (*Chunk) AddFixedLenColumn

func (c *Chunk) AddFixedLenColumn(elemLen, initCap int)

AddFixedLenColumn adds a fixed length column with elemLen and initial data capacity.

func (*Chunk) AddInterfaceColumn

func (c *Chunk) AddInterfaceColumn()

AddInterfaceColumn adds an interface column which holds element as interface.

func (*Chunk) AddVarLenColumn

func (c *Chunk) AddVarLenColumn(initCap int)

AddVarLenColumn adds a variable length column with initial data capacity.

func (*Chunk) AppendBytes

func (c *Chunk) AppendBytes(colIdx int, b []byte)

AppendBytes appends a bytes value to the chunk.

func (*Chunk) AppendDuration

func (c *Chunk) AppendDuration(colIdx int, dur types.Duration)

AppendDuration appends a Duration value to the chunk.

func (*Chunk) AppendEnum

func (c *Chunk) AppendEnum(colIdx int, enum types.Enum)

AppendEnum appends an Enum value to the chunk.

func (*Chunk) AppendFloat32

func (c *Chunk) AppendFloat32(colIdx int, f float32)

AppendFloat32 appends a float32 value to the chunk.

func (*Chunk) AppendFloat64

func (c *Chunk) AppendFloat64(colIdx int, f float64)

AppendFloat64 appends a float64 value to the chunk.

func (*Chunk) AppendInt64

func (c *Chunk) AppendInt64(colIdx int, i int64)

AppendInt64 appends a int64 value to the chunk.

func (*Chunk) AppendJSON

func (c *Chunk) AppendJSON(colIdx int, j json.JSON)

AppendJSON appends a JSON value to the chunk.

func (*Chunk) AppendMyDecimal

func (c *Chunk) AppendMyDecimal(colIdx int, dec *types.MyDecimal)

AppendMyDecimal appends a MyDecimal value to the chunk.

func (*Chunk) AppendNull

func (c *Chunk) AppendNull(colIdx int)

AppendNull appends a null value to the chunk.

func (*Chunk) AppendRow

func (c *Chunk) AppendRow(colIdx int, row Row)

AppendRow appends a row to the chunk.

func (*Chunk) AppendSet

func (c *Chunk) AppendSet(colIdx int, set types.Set)

AppendSet appends a Set value to the chunk.

func (*Chunk) AppendString

func (c *Chunk) AppendString(colIdx int, str string)

AppendString appends a string value to the chunk.

func (*Chunk) AppendTime

func (c *Chunk) AppendTime(colIdx int, t types.Time)

AppendTime appends a Time value to the chunk. TODO: change the time structure so it can be directly written to memory.

func (*Chunk) AppendUint64

func (c *Chunk) AppendUint64(colIdx int, u uint64)

AppendUint64 appends a uint64 value to the chunk.

func (*Chunk) GetRow

func (c *Chunk) GetRow(idx int) Row

GetRow gets the Row in the chunk with the row index.

func (*Chunk) NumCols

func (c *Chunk) NumCols() int

NumCols returns the number of columns in the chunk.

func (*Chunk) NumRows

func (c *Chunk) NumRows() int

NumRows returns the number of rows in the chunk.

func (*Chunk) Reset

func (c *Chunk) Reset()

Reset resets the chunk, so the memory it allocated can be reused. Make sure all the data in the chunk is not used anymore before you reuse this chunk.

type Row

type Row struct {
	// contains filtered or unexported fields
}

Row represents a row of data, can be used to assess values.

func (Row) GetBytes

func (r Row) GetBytes(colIdx int) ([]byte, bool)

GetBytes returns the bytes value and isNull with the colIdx.

func (Row) GetDuration

func (r Row) GetDuration(colIdx int) (types.Duration, bool)

GetDuration returns the Duration value and isNull with the colIdx.

func (Row) GetEnum

func (r Row) GetEnum(colIdx int) (types.Enum, bool)

GetEnum returns the Enum value and isNull with the colIdx.

func (Row) GetFloat32

func (r Row) GetFloat32(colIdx int) (float32, bool)

GetFloat32 returns the float64 value and isNull with the colIdx.

func (Row) GetFloat64

func (r Row) GetFloat64(colIdx int) (float64, bool)

GetFloat64 returns the float64 value and isNull with the colIdx.

func (Row) GetInt64

func (r Row) GetInt64(colIdx int) (int64, bool)

GetInt64 returns the int64 value and isNull with the colIdx.

func (Row) GetJSON

func (r Row) GetJSON(colIdx int) (json.JSON, bool)

GetJSON returns the JSON value and isNull with the colIdx.

func (Row) GetMyDecimal

func (r Row) GetMyDecimal(colIdx int) (*types.MyDecimal, bool)

GetMyDecimal returns the MyDecimal value and isNull with the colIdx.

func (Row) GetSet

func (r Row) GetSet(colIdx int) (types.Set, bool)

GetSet returns the Set value and isNull with the colIdx.

func (Row) GetString

func (r Row) GetString(colIdx int) (string, bool)

GetString returns the string value and isNull with the colIdx.

func (Row) GetTime

func (r Row) GetTime(colIdx int) (types.Time, bool)

GetTime returns the Time value and is isNull with the colIdx.

func (Row) GetUint64

func (r Row) GetUint64(colIdx int) (uint64, bool)

GetUint64 returns the uint64 value and isNull with the colIdx.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL