orc: github.com/scritchley/orc Index | Files | Directories

package orc

import "github.com/scritchley/orc"

Index

Package Files

booleanreader.go booleanwriter.go buffererwriter.go columnstatistics.go compressioncodec.go cursor.go decimal.go dictionary.go dictionary_v2.go float.go orc.go positionrecorder.go reader.go rleencodingtype_string.go runlengthbytereader.go runlengthbytewriter.go runlengthintegerreader.go runlengthintegerreaderv2.go runlengthintegerwriter.go runlengthintegerwriterv2.go streamname.go treereader.go treereaderfactory.go treewriter.go treewriterfactory.go typedescription.go utils.go writer.go

Constants

const (
    // MinRepeatSize is the minimum number of repeated values required to use run length encoding.
    MinRepeatSize = 3
    // MaxShortRepeatLength is the maximum run length used for RLEV2IntShortRepeat sequences.
    MaxShortRepeatLength = 10
    // MaxScope is the maximum number of values that can be buffered before being flushed.
    MaxScope = 512
)
const (
    MaxRepeatSize = 127 + MinRepeatSize
    MinDelta      = -128
    MaxDelta      = 127
)
const (
    // InitialDictionarySize is the initial size used when creating the dictionary.
    InitialDictionarySize = 4096
    // DictionaryEncodingThreshold is the threshold ratio of unique items to the total count of items.
    DictionaryEncodingThreshold = 0.49
)
const (
    BufferSize = 64
)
const (
    MaxLiteralSize = 128
)
const (
    // TimestampBaseSeconds is 1 January 2015, the base value for all timestamp values.
    TimestampBaseSeconds int64 = 1420070400
)

Variables

var (
    // Version0_11 is an ORC file version compatible with Hive 0.11.
    Version0_11 = Version{"0.11", 0, 11}
    // Version0_12 is an ORC file version compatible with Hive 0.12.
    Version0_12 = Version{"0.12", 0, 12}
)
var (
    ErrEOFUnsignedVInt = errors.New("EOF while reading unsigned vint")
    ErrCorrupt         = errors.New("ORC file is corrupt")
)
var (
    CategoryBoolean   = Category{"boolean", true, proto.Type_BOOLEAN.Enum()}
    CategoryByte      = Category{"tinyint", true, proto.Type_BYTE.Enum()}
    CategoryShort     = Category{"smallint", true, proto.Type_SHORT.Enum()}
    CategoryInt       = Category{"int", true, proto.Type_INT.Enum()}
    CategoryLong      = Category{"bigint", true, proto.Type_LONG.Enum()}
    CategoryFloat     = Category{"float", true, proto.Type_FLOAT.Enum()}
    CategoryDouble    = Category{"double", true, proto.Type_DOUBLE.Enum()}
    CategoryString    = Category{"string", true, proto.Type_STRING.Enum()}
    CategoryDate      = Category{"date", true, proto.Type_DATE.Enum()}
    CategoryTimestamp = Category{"timestamp", true, proto.Type_TIMESTAMP.Enum()}
    CategoryBinary    = Category{"binary", true, proto.Type_BINARY.Enum()}
    CategoryDecimal   = Category{"decimal", true, proto.Type_DECIMAL.Enum()}
    CategoryVarchar   = Category{"varchar", true, proto.Type_VARCHAR.Enum()}
    CategoryChar      = Category{"char", true, proto.Type_CHAR.Enum()}
    CategoryList      = Category{"array", false, proto.Type_LIST.Enum()}
    CategoryMap       = Category{"map", false, proto.Type_MAP.Enum()}
    CategoryStruct    = Category{"struct", false, proto.Type_STRUCT.Enum()}
    CategoryUnion     = Category{"uniontype", false, proto.Type_UNION.Enum()}
    Categories        = []Category{
        CategoryBoolean,
        CategoryByte,
        CategoryShort,
        CategoryInt,
        CategoryLong,
        CategoryFloat,
        CategoryDouble,
        CategoryString,
        CategoryDate,
        CategoryTimestamp,
        CategoryBinary,
        CategoryDecimal,
        CategoryVarchar,
        CategoryChar,
        CategoryList,
        CategoryMap,
        CategoryStruct,
        CategoryUnion,
    }
)
var (

    // WriterImplementation identifies the writer implementation
    WriterImplementation = uint32(3)
    // WriterVersion identifies the writer version being used.
    WriterVersion = uint32(6)
    // DefaultStripeTargetSize is the size in bytes over which a stripe should be written to the underlying file.
    DefaultStripeTargetSize int64 = 200 * 1024 * 1024
    // DefaultStripeTargetRowCount is the number of rows over which a stripe should be written to the underlying file.
    DefaultStripeTargetRowCount int64 = 1024 * 1024
    // DefaultCompressionChunkSize is the default size of compression chunks within each stream.
    DefaultCompressionChunkSize uint64 = 256 * 1024
    // DefaultRowIndexStride is the default number of rows between indexes
    DefaultRowIndexStride uint32 = 10000
)

func NewStringPosition Uses

func NewStringPosition(value string) *stringPosition

type BaseStatistics Uses

type BaseStatistics struct {
    *proto.ColumnStatistics
}

func NewBaseStatistics Uses

func NewBaseStatistics() BaseStatistics

func (BaseStatistics) Add Uses

func (b BaseStatistics) Add(value interface{})

func (BaseStatistics) Merge Uses

func (b BaseStatistics) Merge(other ColumnStatistics)

func (BaseStatistics) Statistics Uses

func (b BaseStatistics) Statistics() *proto.ColumnStatistics

type BaseTreeReader Uses

type BaseTreeReader struct {
    *BooleanReader
}

BaseTreeReader wraps a *BooleanReader and is used for reading the Present stream in all TreeReader implementations.

func NewBaseTreeReader Uses

func NewBaseTreeReader(r io.Reader) BaseTreeReader

NewBaseTreeReader return a new BaseTreeReader from the provided io.Reader.

func (BaseTreeReader) Err Uses

func (b BaseTreeReader) Err() error

Err returns the last error to occur.

func (BaseTreeReader) IsPresent Uses

func (b BaseTreeReader) IsPresent() bool

IsPresent returns true if a value is available and is present in the stream.

func (BaseTreeReader) Next Uses

func (b BaseTreeReader) Next() bool

Next returns the next available value.

type BaseTreeWriter Uses

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

BaseTreeWriter is a TreeWriter implementation that writes to the present stream. It is the basis for all other TreeWriter implementations.

func NewBaseTreeWriter Uses

func NewBaseTreeWriter(category Category, codec CompressionCodec) BaseTreeWriter

NewBaseTreeWriter is a TreeWriter that is embedded in all other TreeWriter implementations.

func (*BaseTreeWriter) AddPositionRecorder Uses

func (b *BaseTreeWriter) AddPositionRecorder(recorder PositionRecorder)

func (*BaseTreeWriter) AddStream Uses

func (b *BaseTreeWriter) AddStream(kind *proto.Stream_Kind) Stream

func (*BaseTreeWriter) Close Uses

func (b *BaseTreeWriter) Close() error

Close flushes the underlying BufferedWriter returning an error if one occurs.

func (*BaseTreeWriter) Flush Uses

func (b *BaseTreeWriter) Flush() error

Flush flushes the underlying BufferedWriter returning an error if one occurs.

func (*BaseTreeWriter) RecordPositions Uses

func (b *BaseTreeWriter) RecordPositions()

func (*BaseTreeWriter) RowIndex Uses

func (b *BaseTreeWriter) RowIndex() *proto.RowIndex

func (*BaseTreeWriter) Statistics Uses

func (b *BaseTreeWriter) Statistics() ColumnStatistics

func (*BaseTreeWriter) Streams Uses

func (b *BaseTreeWriter) Streams() []Stream

func (*BaseTreeWriter) Write Uses

func (b *BaseTreeWriter) Write(i interface{}) error

Write checks whether i is nil and writes an appropriate true or false value to the underlying isPresent stream.

type BinaryTreeReader Uses

type BinaryTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

BinaryTreeReader is a TreeReader that reads a Binary type column.

func NewBinaryTreeReader Uses

func NewBinaryTreeReader(present, data, length io.Reader, encoding *proto.ColumnEncoding) (*BinaryTreeReader, error)

func (*BinaryTreeReader) Binary Uses

func (r *BinaryTreeReader) Binary() []byte

func (*BinaryTreeReader) Err Uses

func (r *BinaryTreeReader) Err() error

func (*BinaryTreeReader) Next Uses

func (r *BinaryTreeReader) Next() bool

func (*BinaryTreeReader) Value Uses

func (r *BinaryTreeReader) Value() interface{}

type BooleanReader Uses

type BooleanReader struct {
    *RunLengthByteReader
    // contains filtered or unexported fields
}

func NewBooleanReader Uses

func NewBooleanReader(r io.ByteReader) *BooleanReader

func (*BooleanReader) Bool Uses

func (b *BooleanReader) Bool() bool

func (*BooleanReader) Err Uses

func (b *BooleanReader) Err() error

func (*BooleanReader) Next Uses

func (b *BooleanReader) Next() bool

func (*BooleanReader) Value Uses

func (b *BooleanReader) Value() interface{}

type BooleanTreeReader Uses

type BooleanTreeReader struct {
    BaseTreeReader
    *BooleanReader
}

func NewBooleanTreeReader Uses

func NewBooleanTreeReader(present, data io.Reader, encoding *proto.ColumnEncoding) (*BooleanTreeReader, error)

func (*BooleanTreeReader) Err Uses

func (b *BooleanTreeReader) Err() error

func (*BooleanTreeReader) Next Uses

func (b *BooleanTreeReader) Next() bool

func (*BooleanTreeReader) Value Uses

func (b *BooleanTreeReader) Value() interface{}

type BooleanTreeWriter Uses

type BooleanTreeWriter struct {
    BaseTreeWriter
    *BooleanWriter
    *BufferedWriter
}

func NewBooleanTreeWriter Uses

func NewBooleanTreeWriter(category Category, codec CompressionCodec) (*BooleanTreeWriter, error)

func (*BooleanTreeWriter) Close Uses

func (b *BooleanTreeWriter) Close() error

func (*BooleanTreeWriter) Encoding Uses

func (b *BooleanTreeWriter) Encoding() *proto.ColumnEncoding

func (*BooleanTreeWriter) Flush Uses

func (b *BooleanTreeWriter) Flush() error

func (*BooleanTreeWriter) Write Uses

func (b *BooleanTreeWriter) Write(value interface{}) error

type BooleanWriter Uses

type BooleanWriter struct {
    *RunLengthByteWriter
    // contains filtered or unexported fields
}

func NewBooleanWriter Uses

func NewBooleanWriter(w io.ByteWriter) *BooleanWriter

func (*BooleanWriter) Close Uses

func (b *BooleanWriter) Close() error

func (*BooleanWriter) Flush Uses

func (b *BooleanWriter) Flush() error

func (*BooleanWriter) WriteBool Uses

func (b *BooleanWriter) WriteBool(t bool) error

type BucketStatistics Uses

type BucketStatistics struct {
    BaseStatistics
}

func NewBucketStatistics Uses

func NewBucketStatistics() *BucketStatistics

type BufferedWriter Uses

type BufferedWriter struct {
    sync.Mutex
    // contains filtered or unexported fields
}

func NewBufferedWriter Uses

func NewBufferedWriter(codec CompressionCodec) *BufferedWriter

NewBufferedWriter returns a new BufferedWriter using the provided CompressionCodec.

func (*BufferedWriter) Close Uses

func (b *BufferedWriter) Close() error

Close flushes any buffered bytes to the underlying writer.

func (*BufferedWriter) Flush Uses

func (b *BufferedWriter) Flush() error

func (*BufferedWriter) Len Uses

func (b *BufferedWriter) Len() int

func (*BufferedWriter) Positions Uses

func (b *BufferedWriter) Positions() []uint64

func (*BufferedWriter) Read Uses

func (b *BufferedWriter) Read(p []byte) (int, error)

func (*BufferedWriter) Reset Uses

func (b *BufferedWriter) Reset()

Reset resets the underlying encoded buffer

func (*BufferedWriter) Write Uses

func (b *BufferedWriter) Write(p []byte) (int, error)

Write writes the provided byte slice to the underlying buffer. If the desired chunk size is reached, the buffer is compressed

func (*BufferedWriter) WriteByte Uses

func (b *BufferedWriter) WriteByte(c byte) error

WriteByte writes a byte to the underlying buffer. If the desired chunk size is reached, the buffer is compressed

type ByteTreeReader Uses

type ByteTreeReader struct {
    BaseTreeReader
    *RunLengthByteReader
}

func NewByteTreeReader Uses

func NewByteTreeReader(present, data io.Reader, encoding *proto.ColumnEncoding) (*ByteTreeReader, error)

func (*ByteTreeReader) Err Uses

func (b *ByteTreeReader) Err() error

func (*ByteTreeReader) Next Uses

func (b *ByteTreeReader) Next() bool

func (*ByteTreeReader) Value Uses

func (b *ByteTreeReader) Value() interface{}

type Category Uses

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

func (Category) String Uses

func (c Category) String() string

type ColumnStatistics Uses

type ColumnStatistics interface {
    Statistics() *proto.ColumnStatistics
    Add(value interface{})
    Merge(other ColumnStatistics)
    Reset()
}

func NewColumnStatistics Uses

func NewColumnStatistics(category Category) ColumnStatistics

type CompressionCodec Uses

type CompressionCodec interface {
    Encoder(w io.Writer) io.WriteCloser
    Decoder(r io.Reader) io.Reader
}

CompressionCodec is an interface that provides methods for creating an Encoder or Decoder of the CompressionCodec implementation.

type CompressionNone Uses

type CompressionNone struct{}

CompressionNone is a CompressionCodec that implements no compression.

func (CompressionNone) Decoder Uses

func (c CompressionNone) Decoder(r io.Reader) io.Reader

Decoder implements the CompressionCodec interface.

func (CompressionNone) Encoder Uses

func (c CompressionNone) Encoder(w io.Writer) io.WriteCloser

Encoder implements the CompressionCodec interface.

type CompressionNoneEncoder Uses

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

func (CompressionNoneEncoder) Close Uses

func (c CompressionNoneEncoder) Close() error

func (CompressionNoneEncoder) Flush Uses

func (c CompressionNoneEncoder) Flush() error

func (CompressionNoneEncoder) Write Uses

func (c CompressionNoneEncoder) Write(p []byte) (int, error)

type CompressionSnappy Uses

type CompressionSnappy struct{}

CompressionSnappy implements the CompressionCodec for Snappy compression.

func (CompressionSnappy) Decoder Uses

func (c CompressionSnappy) Decoder(r io.Reader) io.Reader

Decoder implements the CompressionCodec interface.

func (CompressionSnappy) Encoder Uses

func (c CompressionSnappy) Encoder(w io.Writer) io.WriteCloser

Encoder implements the CompressionCodec interface. This is currently not implemented.

type CompressionSnappyDecoder Uses

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

CompressionSnappyDecoder implements the decoder for CompressionSnappy.

func (*CompressionSnappyDecoder) Read Uses

func (c *CompressionSnappyDecoder) Read(p []byte) (int, error)

type CompressionSnappyEncoder Uses

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

func (*CompressionSnappyEncoder) Close Uses

func (c *CompressionSnappyEncoder) Close() error

func (*CompressionSnappyEncoder) Flush Uses

func (c *CompressionSnappyEncoder) Flush() error

func (*CompressionSnappyEncoder) Write Uses

func (c *CompressionSnappyEncoder) Write(p []byte) (int, error)

type CompressionZlib Uses

type CompressionZlib struct {
    Level    int
    Strategy int
}

func (CompressionZlib) Decoder Uses

func (c CompressionZlib) Decoder(r io.Reader) io.Reader

Decoder implements the CompressionCodec interface.

func (CompressionZlib) Encoder Uses

func (c CompressionZlib) Encoder(w io.Writer) io.WriteCloser

Encoder implements the CompressionCodec interface. This is currently not implemented.

type CompressionZlibDecoder Uses

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

CompressionZlibDecoder implements the CompressionCodec for Zlib compression.

func (*CompressionZlibDecoder) Read Uses

func (c *CompressionZlibDecoder) Read(p []byte) (int, error)

type CompressionZlibEncoder Uses

type CompressionZlibEncoder struct {
    Level int
    // contains filtered or unexported fields
}

CompressionZlibEncoder implements the CompressionCodec for Zlib compression.

func (*CompressionZlibEncoder) Close Uses

func (c *CompressionZlibEncoder) Close() error

func (*CompressionZlibEncoder) Write Uses

func (c *CompressionZlibEncoder) Write(p []byte) (int, error)

type Cursor Uses

type Cursor struct {
    *Reader
    *Stripe
    // contains filtered or unexported fields
}

Cursor is used for iterating through the stripes and rows within the ORC file.

func (*Cursor) Err Uses

func (c *Cursor) Err() error

Err returns the last error to have occurred.

func (*Cursor) Next Uses

func (c *Cursor) Next() bool

Next returns true if another set of records are available.

func (*Cursor) Row Uses

func (c *Cursor) Row() []interface{}

Row returns the next row of values.

func (*Cursor) RowIndex Uses

func (c *Cursor) RowIndex(column string) (*proto.RowIndex, error)

RowIndex returns the row index for the provided column from the current strip

func (*Cursor) Scan Uses

func (c *Cursor) Scan(dest ...interface{}) error

Scan assigns the values returned by the readers to the destination slice.

func (*Cursor) Select Uses

func (c *Cursor) Select(fields ...string) *Cursor

Select determines the columns that will be read from the ORC file. Only streams for the selected columns will be loaded into memory.

func (*Cursor) Stripes Uses

func (c *Cursor) Stripes() bool

Stripes prepares the next stripe for reading, returning true once its ready. It returns false if an error occurs whilst preparing the stripe.

type Date Uses

type Date struct {
    time.Time
}

Date is a date value represented by an underlying time.Time.

type DateTreeReader Uses

type DateTreeReader struct {
    *IntegerTreeReader
}

DateTreeReader is a TreeReader implementation that can read date column types.

func NewDateTreeReader Uses

func NewDateTreeReader(present, data io.Reader, encoding *proto.ColumnEncoding) (*DateTreeReader, error)

NewDateTreeReader returns a new DateTreeReader along with any error that occurs.

func (*DateTreeReader) Date Uses

func (d *DateTreeReader) Date() Date

Date returns the next date value as a time.Time.

func (*DateTreeReader) Value Uses

func (d *DateTreeReader) Value() interface{}

Value implements the TreeReader interface.

type DateTreeWriter Uses

type DateTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

DateTreeWriter is a TreeWriter implementation that writes an Date type column.

func NewDateTreeWriter Uses

func NewDateTreeWriter(category Category, codec CompressionCodec) (*DateTreeWriter, error)

NewDateTreeWriter returns a new DateTreeWriter.

func (*DateTreeWriter) Close Uses

func (w *DateTreeWriter) Close() error

Close closes the underlying writers returning an error if one occurs.

func (*DateTreeWriter) Encoding Uses

func (w *DateTreeWriter) Encoding() *proto.ColumnEncoding

Encoding returns the column encoding used for the DateTreeWriter.

func (*DateTreeWriter) Flush Uses

func (w *DateTreeWriter) Flush() error

Flush flushes the underlying writers returning an error if one occurs.

func (*DateTreeWriter) Write Uses

func (w *DateTreeWriter) Write(value interface{}) error

Write writes a value returning an error if one occurs. It accepts a time.Time or a nil value for writing nulls to the stream. Any other types will return an error.

func (*DateTreeWriter) WriteDate Uses

func (w *DateTreeWriter) WriteDate(date time.Time) error

WriteDate writes an Date value returning an error if one occurs.

type Decimal Uses

type Decimal struct {
    Int   *big.Int
    Scale int64
}

Decimal is a decimal type.

func NewDecimal Uses

func NewDecimal(mant *big.Int, scale int64) Decimal

func (Decimal) Float32 Uses

func (d Decimal) Float32() float32

func (Decimal) Float64 Uses

func (d Decimal) Float64() float64

func (Decimal) MarshalJSON Uses

func (d Decimal) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (Decimal) String Uses

func (d Decimal) String() string

type DecimalTreeReader Uses

type DecimalTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

DecimalTreeReader is a TreeReader that reads a Decimal type column.

func NewDecimalTreeReader Uses

func NewDecimalTreeReader(present, data, secondary io.Reader, encoding *proto.ColumnEncoding, precision, scale int) (*DecimalTreeReader, error)

NewDecimalTreeReader returns a new instances of a DecimalTreeReader or an error if one occurs.

func (*DecimalTreeReader) Decimal Uses

func (d *DecimalTreeReader) Decimal() Decimal

Decimal returns the next decimal value as a float64

func (*DecimalTreeReader) Err Uses

func (d *DecimalTreeReader) Err() error

Err returns the last error to have occurred.

func (*DecimalTreeReader) Next Uses

func (d *DecimalTreeReader) Next() bool

Next returns true if a value is available.

func (*DecimalTreeReader) Value Uses

func (d *DecimalTreeReader) Value() interface{}

Value returns the next decimal value as an interface{}

type Dictionary Uses

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

Dictionary is a data structure that holds a distinct set of string values.

func NewDictionary Uses

func NewDictionary(initialCapacity int) *Dictionary

NewDictionary returns a new Dictionary intialised with the provided initialCapacity.

func (*Dictionary) Size Uses

func (d *Dictionary) Size() int

Size returns the number of values stored in the dictionary.

type DictionaryV2 Uses

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

Dictionary is a data structure that holds a distinct set of string values.

func NewDictionaryV2 Uses

func NewDictionaryV2() *DictionaryV2

NewDictionaryV2 returns a new DictionaryV2 intialised with the provided initialCapacity.

type Double Uses

type Double float64

Double is ORC double type i.e. a float64.

type Float Uses

type Float float32

func (Float) MarshalJSON Uses

func (f Float) MarshalJSON() ([]byte, error)

type FloatTreeReader Uses

type FloatTreeReader struct {
    BaseTreeReader
    io.Reader
    // contains filtered or unexported fields
}

func NewFloatTreeReader Uses

func NewFloatTreeReader(bytesPerValue int, present, data io.Reader, encoding *proto.ColumnEncoding) (*FloatTreeReader, error)

func (*FloatTreeReader) Double Uses

func (r *FloatTreeReader) Double() Double

Double returns the next Double value.

func (*FloatTreeReader) Err Uses

func (r *FloatTreeReader) Err() error

func (*FloatTreeReader) Float Uses

func (r *FloatTreeReader) Float() Float

func (*FloatTreeReader) Next Uses

func (r *FloatTreeReader) Next() bool

func (*FloatTreeReader) Value Uses

func (r *FloatTreeReader) Value() interface{}

type FloatTreeWriter Uses

type FloatTreeWriter struct {
    BaseTreeWriter
    *BufferedWriter
    // contains filtered or unexported fields
}

FloatTreeWriter is a TreeWriter that writes to a Float or Double column type.

func NewFloatTreeWriter Uses

func NewFloatTreeWriter(category Category, codec CompressionCodec, bytesPerValue int) (*FloatTreeWriter, error)

NewFloatTreeWriter returns a new FloatTreeWriter or an error if one occurs.

func (*FloatTreeWriter) Close Uses

func (f *FloatTreeWriter) Close() error

func (*FloatTreeWriter) Encoding Uses

func (f *FloatTreeWriter) Encoding() *proto.ColumnEncoding

func (*FloatTreeWriter) Flush Uses

func (f *FloatTreeWriter) Flush() error

func (*FloatTreeWriter) Write Uses

func (f *FloatTreeWriter) Write(value interface{}) error

Write writes a float or double value returning an error if one occurs.

func (*FloatTreeWriter) WriteDouble Uses

func (f *FloatTreeWriter) WriteDouble(value interface{}) error

func (*FloatTreeWriter) WriteFloat Uses

func (f *FloatTreeWriter) WriteFloat(value interface{}) error

type IntegerReader Uses

type IntegerReader interface {
    TreeReader
    Int() int64
}

IntegerReader is an interface that provides methods for reading an integer stream that uses V1 or V2 encoding methods.

type IntegerStatistics Uses

type IntegerStatistics struct {
    BaseStatistics
    // contains filtered or unexported fields
}

func NewIntegerStatistics Uses

func NewIntegerStatistics() *IntegerStatistics

func (*IntegerStatistics) Add Uses

func (i *IntegerStatistics) Add(value interface{})

func (*IntegerStatistics) Merge Uses

func (i *IntegerStatistics) Merge(other ColumnStatistics)

func (*IntegerStatistics) Reset Uses

func (i *IntegerStatistics) Reset()

func (*IntegerStatistics) Statistics Uses

func (i *IntegerStatistics) Statistics() *proto.ColumnStatistics

type IntegerTreeReader Uses

type IntegerTreeReader struct {
    BaseTreeReader
    IntegerReader
}

IntegerTreeReader is a TreeReader that can read Integer type streams.

func NewIntegerTreeReader Uses

func NewIntegerTreeReader(present, data io.Reader, encoding *proto.ColumnEncoding) (*IntegerTreeReader, error)

NewIntegerTreeReader returns a new IntegerReader or an error if one occurs.

func (*IntegerTreeReader) Err Uses

func (i *IntegerTreeReader) Err() error

Err implements the TreeReader interface.

func (*IntegerTreeReader) Next Uses

func (i *IntegerTreeReader) Next() bool

Next implements the TreeReader interface.

func (*IntegerTreeReader) Value Uses

func (i *IntegerTreeReader) Value() interface{}

Value implements the TreeReader interface.

type IntegerTreeWriter Uses

type IntegerTreeWriter struct {
    BaseTreeWriter
    IntegerWriter
    *BufferedWriter
    // contains filtered or unexported fields
}

IntegerTreeWriter is a TreeWriter implementation that writes an integer type column.

func NewIntegerTreeWriter Uses

func NewIntegerTreeWriter(category Category, codec CompressionCodec) (*IntegerTreeWriter, error)

NewIntegerTreeWriter returns a new IntegerTreeWriter.

func (*IntegerTreeWriter) Close Uses

func (w *IntegerTreeWriter) Close() error

Close closes the underlying writers returning an error if one occurs.

func (*IntegerTreeWriter) Encoding Uses

func (w *IntegerTreeWriter) Encoding() *proto.ColumnEncoding

Encoding returns the column encoding used for the IntegerTreeWriter.

func (*IntegerTreeWriter) Flush Uses

func (w *IntegerTreeWriter) Flush() error

Flush flushes the underlying writers returning an error if one occurs.

func (*IntegerTreeWriter) Write Uses

func (w *IntegerTreeWriter) Write(value interface{}) error

Write writes a value returning an error if one occurs. It accepts any form of integer or a nil value for writing nulls to the stream. Any other types will return an error.

func (*IntegerTreeWriter) WriteInt Uses

func (w *IntegerTreeWriter) WriteInt(value int64) error

WriteInt writes an integer value returning an error if one occurs.

type IntegerWriter Uses

type IntegerWriter interface {
    WriteInt(value int64) error
    Close() error
    Flush() error
}

IntegerWriter is an interface implemented by all integer type writers.

type ListTreeReader Uses

type ListTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

func NewListTreeReader Uses

func NewListTreeReader(present, length io.Reader, value TreeReader, encoding *proto.ColumnEncoding) (*ListTreeReader, error)

func (*ListTreeReader) Err Uses

func (r *ListTreeReader) Err() error

func (*ListTreeReader) List Uses

func (r *ListTreeReader) List() []interface{}

func (*ListTreeReader) Next Uses

func (r *ListTreeReader) Next() bool

func (*ListTreeReader) Value Uses

func (r *ListTreeReader) Value() interface{}

type ListTreeWriter Uses

type ListTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

func NewListTreeWriter Uses

func NewListTreeWriter(category Category, codec CompressionCodec, child TreeWriter) (*ListTreeWriter, error)

func (*ListTreeWriter) Close Uses

func (l *ListTreeWriter) Close() error

func (*ListTreeWriter) Encoding Uses

func (l *ListTreeWriter) Encoding() *proto.ColumnEncoding

func (*ListTreeWriter) Flush Uses

func (l *ListTreeWriter) Flush() error

func (*ListTreeWriter) Write Uses

func (l *ListTreeWriter) Write(value interface{}) error

type MapEntry Uses

type MapEntry struct {
    Key   interface{} `json:"key"`
    Value interface{} `json:"value"`
}

MapEntry is an individual entry in a Map.

type MapTreeReader Uses

type MapTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

MapTreeReader is a TreeReader that reads from map encoded columns.

func NewMapTreeReader Uses

func NewMapTreeReader(present, length io.Reader, key, value TreeReader, encoding *proto.ColumnEncoding) (*MapTreeReader, error)

NewMapTreeReader returns a new instance of a MapTreeReader.

func (*MapTreeReader) Map Uses

func (m *MapTreeReader) Map() []MapEntry

Map returns the next available row of MapEntries.

func (*MapTreeReader) Next Uses

func (m *MapTreeReader) Next() bool

Next returns true if another row is available.

func (*MapTreeReader) Value Uses

func (m *MapTreeReader) Value() interface{}

Value implements the TreeReader interface, returning the next available row.

type MapTreeWriter Uses

type MapTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

func NewMapTreeWriter Uses

func NewMapTreeWriter(category Category, codec CompressionCodec, keyWriter, valueWriter TreeWriter) (*MapTreeWriter, error)

func (*MapTreeWriter) Close Uses

func (m *MapTreeWriter) Close() error

func (*MapTreeWriter) Encoding Uses

func (m *MapTreeWriter) Encoding() *proto.ColumnEncoding

func (*MapTreeWriter) Flush Uses

func (m *MapTreeWriter) Flush() error

func (*MapTreeWriter) Write Uses

func (m *MapTreeWriter) Write(value interface{}) error

type PositionRecorder Uses

type PositionRecorder interface {
    Positions() []uint64
}

type PositionRecorders Uses

type PositionRecorders []PositionRecorder

func NewPositionRecorders Uses

func NewPositionRecorders(recorders ...PositionRecorder) PositionRecorders

type RLEEncodingType Uses

type RLEEncodingType int

RLEEncodingType is a run length encoding type specified within the Apache ORC file documentation: https://orc.apache.org/docs/run-length.html

const (
    RLEV2IntShortRepeat RLEEncodingType = 0
    RLEV2IntDirect      RLEEncodingType = 1
    RLEV2IntPatchedBase RLEEncodingType = 2
    RLEV2IntDelta       RLEEncodingType = 3
)

func (RLEEncodingType) String Uses

func (i RLEEncodingType) String() string

type Reader Uses

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

func NewReader Uses

func NewReader(r SizedReaderAt) (*Reader, error)

func Open Uses

func Open(filepath string) (*Reader, error)

Open opens the file at the provided filepath.

func (*Reader) Close Uses

func (r *Reader) Close() error

func (*Reader) NumRows Uses

func (r *Reader) NumRows() int

func (*Reader) Schema Uses

func (r *Reader) Schema() *TypeDescription

func (*Reader) Select Uses

func (r *Reader) Select(fields ...string) *Cursor

type RunLengthByteReader Uses

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

RunLengthByteReader reads a byte run length encoded stream from ByteReader r.

func NewRunLengthByteReader Uses

func NewRunLengthByteReader(r io.ByteReader) *RunLengthByteReader

func (*RunLengthByteReader) Byte Uses

func (b *RunLengthByteReader) Byte() byte

func (*RunLengthByteReader) Err Uses

func (b *RunLengthByteReader) Err() error

func (*RunLengthByteReader) Next Uses

func (b *RunLengthByteReader) Next() bool

func (*RunLengthByteReader) ReadByte Uses

func (b *RunLengthByteReader) ReadByte() (byte, error)

func (*RunLengthByteReader) Value Uses

func (b *RunLengthByteReader) Value() interface{}

type RunLengthByteWriter Uses

type RunLengthByteWriter struct {
    io.ByteWriter
    // contains filtered or unexported fields
}

func NewRunLengthByteWriter Uses

func NewRunLengthByteWriter(w io.ByteWriter) *RunLengthByteWriter

func (*RunLengthByteWriter) Close Uses

func (b *RunLengthByteWriter) Close() error

func (*RunLengthByteWriter) Flush Uses

func (b *RunLengthByteWriter) Flush() error

func (*RunLengthByteWriter) WriteByte Uses

func (b *RunLengthByteWriter) WriteByte(value byte) error

type RunLengthIntegerReader Uses

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

func NewRunLengthIntegerReader Uses

func NewRunLengthIntegerReader(r io.ByteReader, signed bool) *RunLengthIntegerReader

func (*RunLengthIntegerReader) Err Uses

func (r *RunLengthIntegerReader) Err() error

func (*RunLengthIntegerReader) Int Uses

func (r *RunLengthIntegerReader) Int() int64

func (*RunLengthIntegerReader) Next Uses

func (r *RunLengthIntegerReader) Next() bool

func (*RunLengthIntegerReader) ReadByte Uses

func (r *RunLengthIntegerReader) ReadByte() (byte, error)

func (*RunLengthIntegerReader) Value Uses

func (r *RunLengthIntegerReader) Value() interface{}

type RunLengthIntegerReaderV2 Uses

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

func NewRunLengthIntegerReaderV2 Uses

func NewRunLengthIntegerReaderV2(r io.ByteReader, signed bool, skipCorrupt bool) *RunLengthIntegerReaderV2

func (*RunLengthIntegerReaderV2) Err Uses

func (r *RunLengthIntegerReaderV2) Err() error

func (*RunLengthIntegerReaderV2) Int Uses

func (r *RunLengthIntegerReaderV2) Int() int64

func (*RunLengthIntegerReaderV2) Next Uses

func (r *RunLengthIntegerReaderV2) Next() bool

func (*RunLengthIntegerReaderV2) ReadByte Uses

func (r *RunLengthIntegerReaderV2) ReadByte() (byte, error)

func (*RunLengthIntegerReaderV2) Value Uses

func (r *RunLengthIntegerReaderV2) Value() interface{}

type RunLengthIntegerWriter Uses

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

func NewRunLengthIntegerWriter Uses

func NewRunLengthIntegerWriter(w io.ByteWriter, signed bool) *RunLengthIntegerWriter

func (*RunLengthIntegerWriter) Close Uses

func (w *RunLengthIntegerWriter) Close() error

func (*RunLengthIntegerWriter) Flush Uses

func (w *RunLengthIntegerWriter) Flush() error

func (*RunLengthIntegerWriter) WriteInt Uses

func (w *RunLengthIntegerWriter) WriteInt(value int64) error

type RunLengthIntegerWriterV2 Uses

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

func NewRunLengthIntegerWriterV2 Uses

func NewRunLengthIntegerWriterV2(w io.ByteWriter, signed bool) *RunLengthIntegerWriterV2

func (*RunLengthIntegerWriterV2) Close Uses

func (i *RunLengthIntegerWriterV2) Close() error

func (*RunLengthIntegerWriterV2) Flush Uses

func (i *RunLengthIntegerWriterV2) Flush() error

func (*RunLengthIntegerWriterV2) WriteInt Uses

func (i *RunLengthIntegerWriterV2) WriteInt(val int64) error

type SizedReaderAt Uses

type SizedReaderAt interface {
    io.ReaderAt
    Size() int64
}

type Stream Uses

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

Stream is an individual stream for the TreeWriter.

func (Stream) Positions Uses

func (s Stream) Positions() []uint64

type StringDictionaryTreeReader Uses

type StringDictionaryTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

func NewStringDictionaryTreeReader Uses

func NewStringDictionaryTreeReader(present, data, length, dictionary io.Reader, encoding *proto.ColumnEncoding) (*StringDictionaryTreeReader, error)

func (*StringDictionaryTreeReader) Err Uses

func (s *StringDictionaryTreeReader) Err() error

func (*StringDictionaryTreeReader) Next Uses

func (s *StringDictionaryTreeReader) Next() bool

func (*StringDictionaryTreeReader) String Uses

func (s *StringDictionaryTreeReader) String() string

func (*StringDictionaryTreeReader) Value Uses

func (s *StringDictionaryTreeReader) Value() interface{}

type StringDirectTreeReader Uses

type StringDirectTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

StringDirectTreeReader is a StringTreeReader implementation that can read direct encoded string type columns.

func NewStringDirectTreeReader Uses

func NewStringDirectTreeReader(present, data, length io.Reader, kind proto.ColumnEncoding_Kind) (*StringDirectTreeReader, error)

func (*StringDirectTreeReader) Err Uses

func (s *StringDirectTreeReader) Err() error

func (*StringDirectTreeReader) Next Uses

func (s *StringDirectTreeReader) Next() bool

func (*StringDirectTreeReader) String Uses

func (s *StringDirectTreeReader) String() string

func (*StringDirectTreeReader) Value Uses

func (s *StringDirectTreeReader) Value() interface{}

type StringStatistics Uses

type StringStatistics struct {
    BaseStatistics
    // contains filtered or unexported fields
}

func NewStringStatistics Uses

func NewStringStatistics() *StringStatistics

func (*StringStatistics) Add Uses

func (s *StringStatistics) Add(value interface{})

func (*StringStatistics) Merge Uses

func (s *StringStatistics) Merge(other ColumnStatistics)

func (*StringStatistics) Reset Uses

func (s *StringStatistics) Reset()

func (*StringStatistics) Statistics Uses

func (s *StringStatistics) Statistics() *proto.ColumnStatistics

type StringTreeReader Uses

type StringTreeReader interface {
    TreeReader
    String() string
}

IntegerReader is an interface that provides methods for reading a string stream.

func NewStringTreeReader Uses

func NewStringTreeReader(present, data, length, dictionary io.Reader, encoding *proto.ColumnEncoding) (StringTreeReader, error)

NewStringTreeReader returns a StringTreeReader implementation along with any error that occurs.s

type StringTreeWriter Uses

type StringTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

StringTreeWriter is a TreeWriter implementation that writes to a string type column. It dynamically selects the most appropriate encoding format between direct and dictionary encoding based on the cardinality of the values up to the first call to Flush.

func NewStringTreeWriter Uses

func NewStringTreeWriter(category Category, codec CompressionCodec) (*StringTreeWriter, error)

NewStringTreeWriter returns a new StringTreeWriter or an error if one occurs.

func (*StringTreeWriter) Close Uses

func (s *StringTreeWriter) Close() error

Close closes the underlying writes returning an error if one occurs.

func (*StringTreeWriter) Encoding Uses

func (s *StringTreeWriter) Encoding() *proto.ColumnEncoding

Encoding returns the column encoding for the writer, either DICTIONARY_V2 or DIRECT_V2.

func (*StringTreeWriter) Flush Uses

func (s *StringTreeWriter) Flush() error

func (*StringTreeWriter) Write Uses

func (s *StringTreeWriter) Write(value interface{}) error

Write writes the provided value to the underlying writers. It returns an error if the value is not a string type or if an error occurs during writing.

func (*StringTreeWriter) WriteString Uses

func (s *StringTreeWriter) WriteString(value string) error

WriteString writes a string value to the StringTreeWriter returning an error if one occurs.

type Stripe Uses

type Stripe struct {
    *proto.StripeInformation
    // contains filtered or unexported fields
}

func NewStripe Uses

func NewStripe(info *proto.StripeInformation, included ...int) *Stripe

func (*Stripe) FromReader Uses

func (s *Stripe) FromReader(r *Reader) error

type Struct Uses

type Struct map[string]interface{}

type StructTreeReader Uses

type StructTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

func NewStructTreeReader Uses

func NewStructTreeReader(present io.Reader, children map[string]TreeReader) (*StructTreeReader, error)

func (*StructTreeReader) Err Uses

func (s *StructTreeReader) Err() error

func (*StructTreeReader) Next Uses

func (s *StructTreeReader) Next() bool

func (*StructTreeReader) Struct Uses

func (s *StructTreeReader) Struct() Struct

func (*StructTreeReader) Value Uses

func (s *StructTreeReader) Value() interface{}

type StructTreeWriter Uses

type StructTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

StructTreeWriter is a TreeWriter implementation that can write a struct column type.

func NewStructTreeWriter Uses

func NewStructTreeWriter(category Category, codec CompressionCodec, children []TreeWriter) (*StructTreeWriter, error)

NewStructTreeWriter returns a StructTreeWriter using the provided io.Writer and children TreeWriters. It additionally returns an error if one occurs.

func (*StructTreeWriter) Close Uses

func (s *StructTreeWriter) Close() error

Close closes the StructTreeWriter and its child TreeWriters returning an error if one occurs.

func (*StructTreeWriter) Encoding Uses

func (s *StructTreeWriter) Encoding() *proto.ColumnEncoding

Encoding returns the column encoding for the StructTreeWriter.

func (*StructTreeWriter) Flush Uses

func (s *StructTreeWriter) Flush() error

Flush flushes the StructTreeWriter and its child TreeWriters returning an error if one occurs.

func (*StructTreeWriter) RecordPositions Uses

func (s *StructTreeWriter) RecordPositions()

func (*StructTreeWriter) Write Uses

func (s *StructTreeWriter) Write(value interface{}) error

Write writes a value to the underlying child TreeWriters. It returns an error if one occurs.

type TimestampTreeReader Uses

type TimestampTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

TimestampTreeReader is a TreeReader implementation that reads timestamp type columns.

func NewTimestampTreeReader Uses

func NewTimestampTreeReader(present, data, secondary io.Reader, encoding *proto.ColumnEncoding) (*TimestampTreeReader, error)

NewTimestampTreeReader returns a new TimestampTreeReader along with any error that occurs.

func (*TimestampTreeReader) Err Uses

func (t *TimestampTreeReader) Err() error

Err implements the TreeReader interface.

func (*TimestampTreeReader) Next Uses

func (t *TimestampTreeReader) Next() bool

Next implements the TreeReader interface.

func (*TimestampTreeReader) Timestamp Uses

func (t *TimestampTreeReader) Timestamp() time.Time

ValueTimestamp returns the next timestamp value.

func (*TimestampTreeReader) Value Uses

func (t *TimestampTreeReader) Value() interface{}

Value implements the TreeReader interface.

type TimestampTreeWriter Uses

type TimestampTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

TimestampTreeWriter is a TreeWriter implementation that writes an Timestamp type column.

func NewTimestampTreeWriter Uses

func NewTimestampTreeWriter(category Category, codec CompressionCodec) (*TimestampTreeWriter, error)

NewTimestampTreeWriter returns a new TimestampTreeWriter.

func (*TimestampTreeWriter) Close Uses

func (w *TimestampTreeWriter) Close() error

Close closes the underlying writers returning an error if one occurs.

func (*TimestampTreeWriter) Encoding Uses

func (w *TimestampTreeWriter) Encoding() *proto.ColumnEncoding

Encoding returns the column encoding used for the TimestampTreeWriter.

func (*TimestampTreeWriter) Flush Uses

func (w *TimestampTreeWriter) Flush() error

Flush flushes the underlying writers returning an error if one occurs.

func (*TimestampTreeWriter) Write Uses

func (w *TimestampTreeWriter) Write(value interface{}) error

Write writes a value returning an error if one occurs. It accepts any form of Timestamp or a nil value for writing nulls to the stream. Any other types will return an error.

func (*TimestampTreeWriter) WriteTimestamp Uses

func (w *TimestampTreeWriter) WriteTimestamp(value time.Time) error

WriteTimestamp writes an Timestamp value returning an error if one occurs.

type TimestampWriter Uses

type TimestampWriter interface {
    WriteTimestamp(value time.Time) error
    Close() error
    Flush() error
}

TimestampWriter is an interface implemented by all Timestamp type writers.

type TreeReader Uses

type TreeReader interface {
    Next() bool
    Value() interface{}
    Err() error
}

TreeReader is an interface that provides methods for reading an individual stream.

type TreeWriter Uses

type TreeWriter interface {
    // Encoding returns the column encoding used for the TreeWriter.
    Encoding() *proto.ColumnEncoding
    // Write writes the interface value i to the TreeWriter, it returns an error
    // if i is of an unexpected type or if an error occurs whilst writing to
    // the underlying stream.
    Write(i interface{}) error
    // Close flushes the remaining data and closes the writer.
    Close() error
    // Flush flushes any outstanding data to the underlying writer.
    Flush() error
    // Streams returns a slice of streams for the TreeWriter.
    Streams() []Stream
    // RowIndex returns the RowIndex for the writer.
    RowIndex() *proto.RowIndex
    // RecordPositions
    RecordPositions()
    // Statistics
    Statistics() ColumnStatistics
}

TreeWriter is an interface for writing to a stream.

type TypeDescription Uses

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

func NewTypeDescription Uses

func NewTypeDescription(fns ...TypeDescriptionTransformFunc) (*TypeDescription, error)

func ParseSchema Uses

func ParseSchema(schema string) (*TypeDescription, error)

func (*TypeDescription) Columns Uses

func (t *TypeDescription) Columns() []string

func (*TypeDescription) GetField Uses

func (t *TypeDescription) GetField(fieldName string) (*TypeDescription, error)

func (*TypeDescription) MarshalJSON Uses

func (t *TypeDescription) MarshalJSON() ([]byte, error)

MarshalJSON returns a json encoded byte slice of t.

func (*TypeDescription) String Uses

func (t *TypeDescription) String() string

func (*TypeDescription) ToJSON Uses

func (t *TypeDescription) ToJSON() string

ToJSON returns a json encoded string of t.

func (*TypeDescription) Type Uses

func (t *TypeDescription) Type() *proto.Type

func (*TypeDescription) Types Uses

func (t *TypeDescription) Types() []*proto.Type

type TypeDescriptionTransformFunc Uses

type TypeDescriptionTransformFunc func(t *TypeDescription) error

func AddChild Uses

func AddChild(fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc

func AddField Uses

func AddField(field string, fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc

func AddUnionChild Uses

func AddUnionChild(fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc

func SetCategory Uses

func SetCategory(category Category) TypeDescriptionTransformFunc

type UnionTreeReader Uses

type UnionTreeReader struct {
    BaseTreeReader
    // contains filtered or unexported fields
}

UnionTreeReader is a TreeReader that reads a Union type column.

func NewUnionTreeReader Uses

func NewUnionTreeReader(present, data io.Reader, children []TreeReader) (*UnionTreeReader, error)

NewUnionTreeReader returns a new instance of a UnionTreeReader or an error if one occurs.

func (*UnionTreeReader) Err Uses

func (u *UnionTreeReader) Err() error

Err returns the last error to have occurred.

func (*UnionTreeReader) Next Uses

func (u *UnionTreeReader) Next() bool

Next returns true if another value is available.

func (*UnionTreeReader) Value Uses

func (u *UnionTreeReader) Value() interface{}

Value returns the next value as an interface{}.

type UnionTreeWriter Uses

type UnionTreeWriter struct {
    BaseTreeWriter
    // contains filtered or unexported fields
}

UnionTreeWriter is a TreeWriter implementation that can write a unionvalue column type.

func NewUnionTreeWriter Uses

func NewUnionTreeWriter(category Category, codec CompressionCodec, children []TreeWriter) (*UnionTreeWriter, error)

NewUnionTreeWriter returns a UnionTreeWriter using the provided io.Writer and children TreeWriters. It additionally returns an error if one occurs.

func (*UnionTreeWriter) Close Uses

func (s *UnionTreeWriter) Close() error

Close closes the UnionTreeWriter and its child TreeWriters returning an error if one occurs.

func (*UnionTreeWriter) Encoding Uses

func (s *UnionTreeWriter) Encoding() *proto.ColumnEncoding

Encoding returns the column encoding for the UnionTreeWriter.

func (*UnionTreeWriter) Flush Uses

func (s *UnionTreeWriter) Flush() error

Flush flushes the UnionTreeWriter and its child TreeWriters returning an error if one occurs.

func (*UnionTreeWriter) RecordPositions Uses

func (s *UnionTreeWriter) RecordPositions()

func (*UnionTreeWriter) Write Uses

func (s *UnionTreeWriter) Write(value interface{}) error

func (*UnionTreeWriter) WriteUnion Uses

func (s *UnionTreeWriter) WriteUnion(value UnionValue) error

Write writes a value to the underlying child TreeWriters. It returns an error if one occurs.

type UnionValue Uses

type UnionValue struct {
    Tag   int         `json:"tag"`
    Value interface{} `json:"value"`
}

type Version Uses

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

Version is the version of the ORC file.

type Writer Uses

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

func NewWriter Uses

func NewWriter(w io.Writer, fns ...WriterConfigFunc) (*Writer, error)

NewWriter returns a new ORC file writer that writes to the provided io.Writer.

func (*Writer) Close Uses

func (w *Writer) Close() error

func (*Writer) Flush Uses

func (w *Writer) Flush() error

Flush the current stripe to the underlying Writer

func (*Writer) Schema Uses

func (w *Writer) Schema() *TypeDescription

func (*Writer) Write Uses

func (w *Writer) Write(values ...interface{}) error

type WriterConfigFunc Uses

type WriterConfigFunc func(w *Writer) error

func AddUserMetadata Uses

func AddUserMetadata(name string, value []byte) WriterConfigFunc

func SetCompression Uses

func SetCompression(codec CompressionCodec) WriterConfigFunc

func SetSchema Uses

func SetSchema(schema *TypeDescription) WriterConfigFunc

func SetStripeTargetSize Uses

func SetStripeTargetSize(stripeTargetSize int64) WriterConfigFunc

Directories

PathSynopsis
protoPackage proto is a generated protocol buffer package.

Package orc imports 22 packages (graph) and is imported by 1 packages. Updated 2019-01-23. Refresh now. Tools for package owners.