Documentation ¶
Index ¶
- Constants
- Variables
- func NewStringPosition(value string) *stringPosition
- type BaseStatistics
- type BaseTreeReader
- type BaseTreeWriter
- func (b *BaseTreeWriter) AddPositionRecorder(recorder PositionRecorder)
- func (b *BaseTreeWriter) AddStream(kind *proto.Stream_Kind) Stream
- func (b *BaseTreeWriter) Close() error
- func (b *BaseTreeWriter) Flush() error
- func (b *BaseTreeWriter) RecordPositions()
- func (b *BaseTreeWriter) RowIndex() *proto.RowIndex
- func (b *BaseTreeWriter) Statistics() ColumnStatistics
- func (b *BaseTreeWriter) Streams() []Stream
- func (b *BaseTreeWriter) Write(i interface{}) error
- type BinaryTreeReader
- type BooleanReader
- type BooleanTreeReader
- type BooleanTreeWriter
- type BooleanWriter
- type BucketStatistics
- type BufferedWriter
- func (b *BufferedWriter) Close() error
- func (b *BufferedWriter) Flush() error
- func (b *BufferedWriter) Len() int
- func (b *BufferedWriter) Positions() []uint64
- func (b *BufferedWriter) Read(p []byte) (int, error)
- func (b *BufferedWriter) Reset()
- func (b *BufferedWriter) Write(p []byte) (int, error)
- func (b *BufferedWriter) WriteByte(c byte) error
- type ByteTreeReader
- type Category
- type ColumnStatistics
- type CompressionCodec
- type CompressionNone
- type CompressionNoneEncoder
- type CompressionSnappy
- type CompressionSnappyDecoder
- type CompressionSnappyEncoder
- type CompressionZlib
- type CompressionZlibDecoder
- type CompressionZlibEncoder
- type Cursor
- func (c *Cursor) Err() error
- func (c *Cursor) Next() bool
- func (c *Cursor) Row() []interface{}
- func (c *Cursor) RowIndex(column string) (*proto.RowIndex, error)
- func (c *Cursor) Scan(dest ...interface{}) error
- func (c *Cursor) Select(fields ...string) *Cursor
- func (c *Cursor) SelectStripe(n int) error
- func (c *Cursor) Stripes() bool
- type Date
- type DateTreeReader
- type DateTreeWriter
- type Decimal
- type DecimalTreeReader
- type Dictionary
- type DictionaryV2
- type Double
- type Float
- type FloatTreeReader
- type FloatTreeWriter
- func (f *FloatTreeWriter) Close() error
- func (f *FloatTreeWriter) Encoding() *proto.ColumnEncoding
- func (f *FloatTreeWriter) Flush() error
- func (f *FloatTreeWriter) Write(value interface{}) error
- func (f *FloatTreeWriter) WriteDouble(value interface{}) error
- func (f *FloatTreeWriter) WriteFloat(value interface{}) error
- type IntegerReader
- type IntegerStatistics
- type IntegerTreeReader
- type IntegerTreeWriter
- type IntegerWriter
- type ListTreeReader
- type ListTreeWriter
- type MapEntry
- type MapTreeReader
- type MapTreeWriter
- type PositionRecorder
- type PositionRecorders
- type RLEEncodingType
- type Reader
- type RunLengthByteReader
- type RunLengthByteWriter
- type RunLengthIntegerReader
- type RunLengthIntegerReaderV2
- type RunLengthIntegerWriter
- type RunLengthIntegerWriterV2
- type SizedReaderAt
- type Stream
- type StringDictionaryTreeReader
- type StringDirectTreeReader
- type StringStatistics
- type StringTreeReader
- type StringTreeWriter
- type Stripe
- type Struct
- type StructTreeReader
- type StructTreeWriter
- type TimestampStatistics
- type TimestampTreeReader
- type TimestampTreeWriter
- type TimestampWriter
- type TreeReader
- type TreeWriter
- type TypeDescription
- func (t *TypeDescription) Columns() []string
- func (t *TypeDescription) GetField(fieldName string) (*TypeDescription, error)
- func (t *TypeDescription) MarshalJSON() ([]byte, error)
- func (t *TypeDescription) String() string
- func (t *TypeDescription) ToJSON() string
- func (t *TypeDescription) Type() *proto.Type
- func (t *TypeDescription) Types() []*proto.Type
- type TypeDescriptionTransformFunc
- func AddChild(fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc
- func AddField(field string, fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc
- func AddUnionChild(fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc
- func SetCategory(category Category) TypeDescriptionTransformFunc
- type UnionTreeReader
- type UnionTreeWriter
- func (s *UnionTreeWriter) Close() error
- func (s *UnionTreeWriter) Encoding() *proto.ColumnEncoding
- func (s *UnionTreeWriter) Flush() error
- func (s *UnionTreeWriter) RecordPositions()
- func (s *UnionTreeWriter) Write(value interface{}) error
- func (s *UnionTreeWriter) WriteUnion(value UnionValue) error
- type UnionValue
- type Version
- type Writer
- type WriterConfigFunc
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 // DefaultStripeWriterTimezone is the timezone that writer adds into the stripe footer. DefaultStripeWriterTimezone string = "GMT" // 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 )
Functions ¶
func NewStringPosition ¶
func NewStringPosition(value string) *stringPosition
Types ¶
type BaseStatistics ¶
type BaseStatistics struct {
*proto.ColumnStatistics
}
func NewBaseStatistics ¶
func NewBaseStatistics() BaseStatistics
func (BaseStatistics) Add ¶
func (b BaseStatistics) Add(value interface{})
func (BaseStatistics) Merge ¶
func (b BaseStatistics) Merge(other ColumnStatistics)
func (BaseStatistics) Statistics ¶
func (b BaseStatistics) Statistics() *proto.ColumnStatistics
type BaseTreeReader ¶
type BaseTreeReader struct {
*BooleanReader
}
BaseTreeReader wraps a *BooleanReader and is used for reading the Present stream in all TreeReader implementations.
func NewBaseTreeReader ¶
func NewBaseTreeReader(r io.Reader) BaseTreeReader
NewBaseTreeReader return a new BaseTreeReader from the provided io.Reader.
func (BaseTreeReader) Err ¶
func (b BaseTreeReader) Err() error
Err returns the last error to occur.
func (BaseTreeReader) IsPresent ¶
func (b BaseTreeReader) IsPresent() bool
IsPresent returns true if a value is available and is present in the stream.
func (BaseTreeReader) Next ¶
func (b BaseTreeReader) Next() bool
Next returns the next available value.
type BaseTreeWriter ¶
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 ¶
func NewBaseTreeWriter(category Category, codec CompressionCodec) BaseTreeWriter
NewBaseTreeWriter is a TreeWriter that is embedded in all other TreeWriter implementations.
func (*BaseTreeWriter) AddPositionRecorder ¶
func (b *BaseTreeWriter) AddPositionRecorder(recorder PositionRecorder)
func (*BaseTreeWriter) AddStream ¶
func (b *BaseTreeWriter) AddStream(kind *proto.Stream_Kind) Stream
func (*BaseTreeWriter) Close ¶
func (b *BaseTreeWriter) Close() error
Close flushes the underlying BufferedWriter returning an error if one occurs.
func (*BaseTreeWriter) Flush ¶
func (b *BaseTreeWriter) Flush() error
Flush flushes the underlying BufferedWriter returning an error if one occurs.
func (*BaseTreeWriter) RecordPositions ¶
func (b *BaseTreeWriter) RecordPositions()
func (*BaseTreeWriter) RowIndex ¶
func (b *BaseTreeWriter) RowIndex() *proto.RowIndex
func (*BaseTreeWriter) Statistics ¶
func (b *BaseTreeWriter) Statistics() ColumnStatistics
func (*BaseTreeWriter) Streams ¶
func (b *BaseTreeWriter) Streams() []Stream
func (*BaseTreeWriter) Write ¶
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 ¶
type BinaryTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
BinaryTreeReader is a TreeReader that reads a Binary type column.
func NewBinaryTreeReader ¶
func NewBinaryTreeReader(present, data, length io.Reader, encoding *proto.ColumnEncoding) (*BinaryTreeReader, error)
func (*BinaryTreeReader) Binary ¶
func (r *BinaryTreeReader) Binary() []byte
func (*BinaryTreeReader) Err ¶
func (r *BinaryTreeReader) Err() error
func (*BinaryTreeReader) Next ¶
func (r *BinaryTreeReader) Next() bool
func (*BinaryTreeReader) Value ¶
func (r *BinaryTreeReader) Value() interface{}
type BooleanReader ¶
type BooleanReader struct { *RunLengthByteReader // contains filtered or unexported fields }
func NewBooleanReader ¶
func NewBooleanReader(r io.ByteReader) *BooleanReader
func (*BooleanReader) Bool ¶
func (b *BooleanReader) Bool() bool
func (*BooleanReader) Err ¶
func (b *BooleanReader) Err() error
func (*BooleanReader) Next ¶
func (b *BooleanReader) Next() bool
func (*BooleanReader) Value ¶
func (b *BooleanReader) Value() interface{}
type BooleanTreeReader ¶
type BooleanTreeReader struct { BaseTreeReader *BooleanReader }
func NewBooleanTreeReader ¶
func NewBooleanTreeReader(present, data io.Reader, encoding *proto.ColumnEncoding) (*BooleanTreeReader, error)
func (*BooleanTreeReader) Err ¶
func (b *BooleanTreeReader) Err() error
func (*BooleanTreeReader) Next ¶
func (b *BooleanTreeReader) Next() bool
func (*BooleanTreeReader) Value ¶
func (b *BooleanTreeReader) Value() interface{}
type BooleanTreeWriter ¶
type BooleanTreeWriter struct { BaseTreeWriter *BooleanWriter *BufferedWriter }
func NewBooleanTreeWriter ¶
func NewBooleanTreeWriter(category Category, codec CompressionCodec) (*BooleanTreeWriter, error)
func (*BooleanTreeWriter) Close ¶
func (b *BooleanTreeWriter) Close() error
func (*BooleanTreeWriter) Encoding ¶
func (b *BooleanTreeWriter) Encoding() *proto.ColumnEncoding
func (*BooleanTreeWriter) Flush ¶
func (b *BooleanTreeWriter) Flush() error
func (*BooleanTreeWriter) Write ¶
func (b *BooleanTreeWriter) Write(value interface{}) error
type BooleanWriter ¶
type BooleanWriter struct { *RunLengthByteWriter // contains filtered or unexported fields }
func NewBooleanWriter ¶
func NewBooleanWriter(w io.ByteWriter) *BooleanWriter
func (*BooleanWriter) Close ¶
func (b *BooleanWriter) Close() error
func (*BooleanWriter) Flush ¶
func (b *BooleanWriter) Flush() error
func (*BooleanWriter) WriteBool ¶
func (b *BooleanWriter) WriteBool(t bool) error
type BucketStatistics ¶
type BucketStatistics struct {
BaseStatistics
}
func NewBucketStatistics ¶
func NewBucketStatistics() *BucketStatistics
type BufferedWriter ¶
func NewBufferedWriter ¶
func NewBufferedWriter(codec CompressionCodec) *BufferedWriter
NewBufferedWriter returns a new BufferedWriter using the provided CompressionCodec.
func (*BufferedWriter) Close ¶
func (b *BufferedWriter) Close() error
Close flushes any buffered bytes to the underlying writer.
func (*BufferedWriter) Flush ¶
func (b *BufferedWriter) Flush() error
func (*BufferedWriter) Len ¶
func (b *BufferedWriter) Len() int
func (*BufferedWriter) Positions ¶
func (b *BufferedWriter) Positions() []uint64
func (*BufferedWriter) Reset ¶
func (b *BufferedWriter) Reset()
Reset resets the underlying encoded buffer
func (*BufferedWriter) Write ¶
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 ¶
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 ¶
type ByteTreeReader struct { BaseTreeReader *RunLengthByteReader }
func NewByteTreeReader ¶
func NewByteTreeReader(present, data io.Reader, encoding *proto.ColumnEncoding) (*ByteTreeReader, error)
func (*ByteTreeReader) Err ¶
func (b *ByteTreeReader) Err() error
func (*ByteTreeReader) Next ¶
func (b *ByteTreeReader) Next() bool
func (*ByteTreeReader) Value ¶
func (b *ByteTreeReader) Value() interface{}
type ColumnStatistics ¶
type ColumnStatistics interface { Statistics() *proto.ColumnStatistics Add(value interface{}) Merge(other ColumnStatistics) Reset() }
func NewColumnStatistics ¶
func NewColumnStatistics(category Category) ColumnStatistics
type CompressionCodec ¶
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 ¶
type CompressionNone struct{}
CompressionNone is a CompressionCodec that implements no compression.
func (CompressionNone) Decoder ¶
func (c CompressionNone) Decoder(r io.Reader) io.Reader
Decoder implements the CompressionCodec interface.
func (CompressionNone) Encoder ¶
func (c CompressionNone) Encoder(w io.Writer) io.WriteCloser
Encoder implements the CompressionCodec interface.
type CompressionNoneEncoder ¶
type CompressionNoneEncoder struct {
// contains filtered or unexported fields
}
func (CompressionNoneEncoder) Close ¶
func (c CompressionNoneEncoder) Close() error
func (CompressionNoneEncoder) Flush ¶
func (c CompressionNoneEncoder) Flush() error
type CompressionSnappy ¶
type CompressionSnappy struct{}
CompressionSnappy implements the CompressionCodec for Snappy compression.
func (CompressionSnappy) Decoder ¶
func (c CompressionSnappy) Decoder(r io.Reader) io.Reader
Decoder implements the CompressionCodec interface.
func (CompressionSnappy) Encoder ¶
func (c CompressionSnappy) Encoder(w io.Writer) io.WriteCloser
Encoder implements the CompressionCodec interface. This is currently not implemented.
type CompressionSnappyDecoder ¶
type CompressionSnappyDecoder struct {
// contains filtered or unexported fields
}
CompressionSnappyDecoder implements the decoder for CompressionSnappy.
type CompressionSnappyEncoder ¶
type CompressionSnappyEncoder struct {
// contains filtered or unexported fields
}
func (*CompressionSnappyEncoder) Close ¶
func (c *CompressionSnappyEncoder) Close() error
func (*CompressionSnappyEncoder) Flush ¶
func (c *CompressionSnappyEncoder) Flush() error
type CompressionZlib ¶
func (CompressionZlib) Decoder ¶
func (c CompressionZlib) Decoder(r io.Reader) io.Reader
Decoder implements the CompressionCodec interface.
func (CompressionZlib) Encoder ¶
func (c CompressionZlib) Encoder(w io.Writer) io.WriteCloser
Encoder implements the CompressionCodec interface. This is currently not implemented.
type CompressionZlibDecoder ¶
type CompressionZlibDecoder struct {
// contains filtered or unexported fields
}
CompressionZlibDecoder implements the CompressionCodec for Zlib compression.
type CompressionZlibEncoder ¶
type CompressionZlibEncoder struct { Level int // contains filtered or unexported fields }
CompressionZlibEncoder implements the CompressionCodec for Zlib compression.
func (*CompressionZlibEncoder) Close ¶
func (c *CompressionZlibEncoder) Close() error
type Cursor ¶
Cursor is used for iterating through the stripes and rows within the ORC file.
func (*Cursor) RowIndex ¶
RowIndex returns the row index for the provided column from the current strip
func (*Cursor) Select ¶
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) SelectStripe ¶
SelectStripe retrieves the stream information for the specified stripe.
type DateTreeReader ¶
type DateTreeReader struct {
*IntegerTreeReader
}
DateTreeReader is a TreeReader implementation that can read date column types.
func NewDateTreeReader ¶
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 ¶
func (d *DateTreeReader) Date() Date
Date returns the next date value as a time.Time.
func (*DateTreeReader) Value ¶
func (d *DateTreeReader) Value() interface{}
Value implements the TreeReader interface.
type DateTreeWriter ¶
type DateTreeWriter struct { BaseTreeWriter // contains filtered or unexported fields }
DateTreeWriter is a TreeWriter implementation that writes an Date type column.
func NewDateTreeWriter ¶
func NewDateTreeWriter(category Category, codec CompressionCodec) (*DateTreeWriter, error)
NewDateTreeWriter returns a new DateTreeWriter.
func (*DateTreeWriter) Close ¶
func (w *DateTreeWriter) Close() error
Close closes the underlying writers returning an error if one occurs.
func (*DateTreeWriter) Encoding ¶
func (w *DateTreeWriter) Encoding() *proto.ColumnEncoding
Encoding returns the column encoding used for the DateTreeWriter.
func (*DateTreeWriter) Flush ¶
func (w *DateTreeWriter) Flush() error
Flush flushes the underlying writers returning an error if one occurs.
func (*DateTreeWriter) Write ¶
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.
type Decimal ¶
Decimal is a decimal type.
func (Decimal) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface.
type DecimalTreeReader ¶
type DecimalTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
DecimalTreeReader is a TreeReader that reads a Decimal type column.
func NewDecimalTreeReader ¶
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 ¶
func (d *DecimalTreeReader) Decimal() Decimal
Decimal returns the next decimal value as a float64
func (*DecimalTreeReader) Err ¶
func (d *DecimalTreeReader) Err() error
Err returns the last error to have occurred.
func (*DecimalTreeReader) Next ¶
func (d *DecimalTreeReader) Next() bool
Next returns true if a value is available.
func (*DecimalTreeReader) Value ¶
func (d *DecimalTreeReader) Value() interface{}
Value returns the next decimal value as an interface{}
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
Dictionary is a data structure that holds a distinct set of string values.
func NewDictionary ¶
func NewDictionary(initialCapacity int) *Dictionary
NewDictionary returns a new Dictionary intialised with the provided initialCapacity.
func (*Dictionary) Size ¶
func (d *Dictionary) Size() int
Size returns the number of values stored in the dictionary.
type DictionaryV2 ¶
type DictionaryV2 struct {
// contains filtered or unexported fields
}
Dictionary is a data structure that holds a distinct set of string values.
func NewDictionaryV2 ¶
func NewDictionaryV2() *DictionaryV2
NewDictionaryV2 returns a new DictionaryV2 intialised with the provided initialCapacity.
type FloatTreeReader ¶
type FloatTreeReader struct { BaseTreeReader io.Reader // contains filtered or unexported fields }
func NewFloatTreeReader ¶
func NewFloatTreeReader(bytesPerValue int, present, data io.Reader, encoding *proto.ColumnEncoding) (*FloatTreeReader, error)
func (*FloatTreeReader) Double ¶
func (r *FloatTreeReader) Double() Double
Double returns the next Double value.
func (*FloatTreeReader) Err ¶
func (r *FloatTreeReader) Err() error
func (*FloatTreeReader) Float ¶
func (r *FloatTreeReader) Float() Float
func (*FloatTreeReader) Next ¶
func (r *FloatTreeReader) Next() bool
func (*FloatTreeReader) Value ¶
func (r *FloatTreeReader) Value() interface{}
type FloatTreeWriter ¶
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 ¶
func NewFloatTreeWriter(category Category, codec CompressionCodec, bytesPerValue int) (*FloatTreeWriter, error)
NewFloatTreeWriter returns a new FloatTreeWriter or an error if one occurs.
func (*FloatTreeWriter) Close ¶
func (f *FloatTreeWriter) Close() error
func (*FloatTreeWriter) Encoding ¶
func (f *FloatTreeWriter) Encoding() *proto.ColumnEncoding
func (*FloatTreeWriter) Flush ¶
func (f *FloatTreeWriter) Flush() error
func (*FloatTreeWriter) Write ¶
func (f *FloatTreeWriter) Write(value interface{}) error
Write writes a float or double value returning an error if one occurs.
func (*FloatTreeWriter) WriteDouble ¶
func (f *FloatTreeWriter) WriteDouble(value interface{}) error
func (*FloatTreeWriter) WriteFloat ¶
func (f *FloatTreeWriter) WriteFloat(value interface{}) error
type IntegerReader ¶
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 ¶
type IntegerStatistics struct { BaseStatistics // contains filtered or unexported fields }
func NewIntegerStatistics ¶
func NewIntegerStatistics() *IntegerStatistics
func (*IntegerStatistics) Add ¶
func (i *IntegerStatistics) Add(value interface{})
func (*IntegerStatistics) Merge ¶
func (i *IntegerStatistics) Merge(other ColumnStatistics)
func (*IntegerStatistics) Reset ¶
func (i *IntegerStatistics) Reset()
func (*IntegerStatistics) Statistics ¶
func (i *IntegerStatistics) Statistics() *proto.ColumnStatistics
type IntegerTreeReader ¶
type IntegerTreeReader struct { BaseTreeReader IntegerReader }
IntegerTreeReader is a TreeReader that can read Integer type streams.
func NewIntegerTreeReader ¶
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 ¶
func (i *IntegerTreeReader) Err() error
Err implements the TreeReader interface.
func (*IntegerTreeReader) Next ¶
func (i *IntegerTreeReader) Next() bool
Next implements the TreeReader interface.
func (*IntegerTreeReader) Value ¶
func (i *IntegerTreeReader) Value() interface{}
Value implements the TreeReader interface.
type IntegerTreeWriter ¶
type IntegerTreeWriter struct { BaseTreeWriter IntegerWriter *BufferedWriter // contains filtered or unexported fields }
IntegerTreeWriter is a TreeWriter implementation that writes an integer type column.
func NewIntegerTreeWriter ¶
func NewIntegerTreeWriter(category Category, codec CompressionCodec) (*IntegerTreeWriter, error)
NewIntegerTreeWriter returns a new IntegerTreeWriter.
func (*IntegerTreeWriter) Close ¶
func (w *IntegerTreeWriter) Close() error
Close closes the underlying writers returning an error if one occurs.
func (*IntegerTreeWriter) Encoding ¶
func (w *IntegerTreeWriter) Encoding() *proto.ColumnEncoding
Encoding returns the column encoding used for the IntegerTreeWriter.
func (*IntegerTreeWriter) Flush ¶
func (w *IntegerTreeWriter) Flush() error
Flush flushes the underlying writers returning an error if one occurs.
func (*IntegerTreeWriter) Write ¶
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 ¶
func (w *IntegerTreeWriter) WriteInt(value int64) error
WriteInt writes an integer value returning an error if one occurs.
type IntegerWriter ¶
IntegerWriter is an interface implemented by all integer type writers.
type ListTreeReader ¶
type ListTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
func NewListTreeReader ¶
func NewListTreeReader(present, length io.Reader, value TreeReader, encoding *proto.ColumnEncoding) (*ListTreeReader, error)
func (*ListTreeReader) Err ¶
func (r *ListTreeReader) Err() error
func (*ListTreeReader) List ¶
func (r *ListTreeReader) List() []interface{}
func (*ListTreeReader) Next ¶
func (r *ListTreeReader) Next() bool
func (*ListTreeReader) Value ¶
func (r *ListTreeReader) Value() interface{}
type ListTreeWriter ¶
type ListTreeWriter struct { BaseTreeWriter // contains filtered or unexported fields }
func NewListTreeWriter ¶
func NewListTreeWriter(category Category, codec CompressionCodec, child TreeWriter) (*ListTreeWriter, error)
func (*ListTreeWriter) Close ¶
func (l *ListTreeWriter) Close() error
func (*ListTreeWriter) Encoding ¶
func (l *ListTreeWriter) Encoding() *proto.ColumnEncoding
func (*ListTreeWriter) Flush ¶
func (l *ListTreeWriter) Flush() error
func (*ListTreeWriter) Write ¶
func (l *ListTreeWriter) Write(value interface{}) error
type MapEntry ¶
type MapEntry struct { Key interface{} `json:"key"` Value interface{} `json:"value"` }
MapEntry is an individual entry in a Map.
type MapTreeReader ¶
type MapTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
MapTreeReader is a TreeReader that reads from map encoded columns.
func NewMapTreeReader ¶
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 ¶
func (m *MapTreeReader) Map() []MapEntry
Map returns the next available row of MapEntries.
func (*MapTreeReader) Next ¶
func (m *MapTreeReader) Next() bool
Next returns true if another row is available.
func (*MapTreeReader) Value ¶
func (m *MapTreeReader) Value() interface{}
Value implements the TreeReader interface, returning the next available row.
type MapTreeWriter ¶
type MapTreeWriter struct { BaseTreeWriter // contains filtered or unexported fields }
func NewMapTreeWriter ¶
func NewMapTreeWriter(category Category, codec CompressionCodec, keyWriter, valueWriter TreeWriter) (*MapTreeWriter, error)
func (*MapTreeWriter) Close ¶
func (m *MapTreeWriter) Close() error
func (*MapTreeWriter) Encoding ¶
func (m *MapTreeWriter) Encoding() *proto.ColumnEncoding
func (*MapTreeWriter) Flush ¶
func (m *MapTreeWriter) Flush() error
func (*MapTreeWriter) Write ¶
func (m *MapTreeWriter) Write(value interface{}) error
type PositionRecorder ¶
type PositionRecorder interface {
Positions() []uint64
}
type PositionRecorders ¶
type PositionRecorders []PositionRecorder
func NewPositionRecorders ¶
func NewPositionRecorders(recorders ...PositionRecorder) PositionRecorders
type RLEEncodingType ¶
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 ¶
func (i RLEEncodingType) String() string
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(r SizedReaderAt) (*Reader, error)
func (*Reader) NumStripes ¶
func (*Reader) Schema ¶
func (r *Reader) Schema() *TypeDescription
type RunLengthByteReader ¶
type RunLengthByteReader struct {
// contains filtered or unexported fields
}
RunLengthByteReader reads a byte run length encoded stream from ByteReader r.
func NewRunLengthByteReader ¶
func NewRunLengthByteReader(r io.ByteReader) *RunLengthByteReader
func (*RunLengthByteReader) Byte ¶
func (b *RunLengthByteReader) Byte() byte
func (*RunLengthByteReader) Err ¶
func (b *RunLengthByteReader) Err() error
func (*RunLengthByteReader) Next ¶
func (b *RunLengthByteReader) Next() bool
func (*RunLengthByteReader) ReadByte ¶
func (b *RunLengthByteReader) ReadByte() (byte, error)
func (*RunLengthByteReader) Value ¶
func (b *RunLengthByteReader) Value() interface{}
type RunLengthByteWriter ¶
type RunLengthByteWriter struct { io.ByteWriter // contains filtered or unexported fields }
func NewRunLengthByteWriter ¶
func NewRunLengthByteWriter(w io.ByteWriter) *RunLengthByteWriter
func (*RunLengthByteWriter) Close ¶
func (b *RunLengthByteWriter) Close() error
func (*RunLengthByteWriter) Flush ¶
func (b *RunLengthByteWriter) Flush() error
func (*RunLengthByteWriter) WriteByte ¶
func (b *RunLengthByteWriter) WriteByte(value byte) error
type RunLengthIntegerReader ¶
type RunLengthIntegerReader struct {
// contains filtered or unexported fields
}
func NewRunLengthIntegerReader ¶
func NewRunLengthIntegerReader(r io.ByteReader, signed bool) *RunLengthIntegerReader
func (*RunLengthIntegerReader) Err ¶
func (r *RunLengthIntegerReader) Err() error
func (*RunLengthIntegerReader) Int ¶
func (r *RunLengthIntegerReader) Int() int64
func (*RunLengthIntegerReader) Next ¶
func (r *RunLengthIntegerReader) Next() bool
func (*RunLengthIntegerReader) ReadByte ¶
func (r *RunLengthIntegerReader) ReadByte() (byte, error)
func (*RunLengthIntegerReader) Value ¶
func (r *RunLengthIntegerReader) Value() interface{}
type RunLengthIntegerReaderV2 ¶
type RunLengthIntegerReaderV2 struct {
// contains filtered or unexported fields
}
func NewRunLengthIntegerReaderV2 ¶
func NewRunLengthIntegerReaderV2(r io.ByteReader, signed bool, skipCorrupt bool) *RunLengthIntegerReaderV2
func (*RunLengthIntegerReaderV2) Err ¶
func (r *RunLengthIntegerReaderV2) Err() error
func (*RunLengthIntegerReaderV2) Int ¶
func (r *RunLengthIntegerReaderV2) Int() int64
func (*RunLengthIntegerReaderV2) Next ¶
func (r *RunLengthIntegerReaderV2) Next() bool
func (*RunLengthIntegerReaderV2) ReadByte ¶
func (r *RunLengthIntegerReaderV2) ReadByte() (byte, error)
func (*RunLengthIntegerReaderV2) Value ¶
func (r *RunLengthIntegerReaderV2) Value() interface{}
type RunLengthIntegerWriter ¶
type RunLengthIntegerWriter struct {
// contains filtered or unexported fields
}
func NewRunLengthIntegerWriter ¶
func NewRunLengthIntegerWriter(w io.ByteWriter, signed bool) *RunLengthIntegerWriter
func (*RunLengthIntegerWriter) Close ¶
func (w *RunLengthIntegerWriter) Close() error
func (*RunLengthIntegerWriter) Flush ¶
func (w *RunLengthIntegerWriter) Flush() error
func (*RunLengthIntegerWriter) WriteInt ¶
func (w *RunLengthIntegerWriter) WriteInt(value int64) error
type RunLengthIntegerWriterV2 ¶
type RunLengthIntegerWriterV2 struct {
// contains filtered or unexported fields
}
func NewRunLengthIntegerWriterV2 ¶
func NewRunLengthIntegerWriterV2(w io.ByteWriter, signed bool) *RunLengthIntegerWriterV2
func (*RunLengthIntegerWriterV2) Close ¶
func (i *RunLengthIntegerWriterV2) Close() error
func (*RunLengthIntegerWriterV2) Flush ¶
func (i *RunLengthIntegerWriterV2) Flush() error
func (*RunLengthIntegerWriterV2) WriteInt ¶
func (i *RunLengthIntegerWriterV2) WriteInt(val int64) error
type SizedReaderAt ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is an individual stream for the TreeWriter.
type StringDictionaryTreeReader ¶
type StringDictionaryTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
func NewStringDictionaryTreeReader ¶
func NewStringDictionaryTreeReader(present, data, length, dictionary io.Reader, encoding *proto.ColumnEncoding) (*StringDictionaryTreeReader, error)
func (*StringDictionaryTreeReader) Err ¶
func (s *StringDictionaryTreeReader) Err() error
func (*StringDictionaryTreeReader) Next ¶
func (s *StringDictionaryTreeReader) Next() bool
func (*StringDictionaryTreeReader) String ¶
func (s *StringDictionaryTreeReader) String() string
func (*StringDictionaryTreeReader) Value ¶
func (s *StringDictionaryTreeReader) Value() interface{}
type StringDirectTreeReader ¶
type StringDirectTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
StringDirectTreeReader is a StringTreeReader implementation that can read direct encoded string type columns.
func NewStringDirectTreeReader ¶
func NewStringDirectTreeReader(present, data, length io.Reader, kind proto.ColumnEncoding_Kind) (*StringDirectTreeReader, error)
func (*StringDirectTreeReader) Err ¶
func (s *StringDirectTreeReader) Err() error
func (*StringDirectTreeReader) Next ¶
func (s *StringDirectTreeReader) Next() bool
func (*StringDirectTreeReader) String ¶
func (s *StringDirectTreeReader) String() string
func (*StringDirectTreeReader) Value ¶
func (s *StringDirectTreeReader) Value() interface{}
type StringStatistics ¶
type StringStatistics struct { BaseStatistics // contains filtered or unexported fields }
func NewStringStatistics ¶
func NewStringStatistics() *StringStatistics
func (*StringStatistics) Add ¶
func (s *StringStatistics) Add(value interface{})
func (*StringStatistics) Merge ¶
func (s *StringStatistics) Merge(other ColumnStatistics)
func (*StringStatistics) Reset ¶
func (s *StringStatistics) Reset()
func (*StringStatistics) Statistics ¶
func (s *StringStatistics) Statistics() *proto.ColumnStatistics
type StringTreeReader ¶
type StringTreeReader interface { TreeReader String() string }
IntegerReader is an interface that provides methods for reading a string stream.
func NewStringTreeReader ¶
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 ¶
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 ¶
func NewStringTreeWriter(category Category, codec CompressionCodec) (*StringTreeWriter, error)
NewStringTreeWriter returns a new StringTreeWriter or an error if one occurs.
func (*StringTreeWriter) Close ¶
func (s *StringTreeWriter) Close() error
Close closes the underlying writes returning an error if one occurs.
func (*StringTreeWriter) Encoding ¶
func (s *StringTreeWriter) Encoding() *proto.ColumnEncoding
Encoding returns the column encoding for the writer, either DICTIONARY_V2 or DIRECT_V2.
func (*StringTreeWriter) Flush ¶
func (s *StringTreeWriter) Flush() error
func (*StringTreeWriter) Write ¶
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 ¶
func (s *StringTreeWriter) WriteString(value string) error
WriteString writes a string value to the StringTreeWriter returning an error if one occurs.
type Stripe ¶
type Stripe struct { *proto.StripeInformation // contains filtered or unexported fields }
func (*Stripe) FromReader ¶
type StructTreeReader ¶
type StructTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
func NewStructTreeReader ¶
func NewStructTreeReader(present io.Reader, children map[string]TreeReader) (*StructTreeReader, error)
func (*StructTreeReader) Err ¶
func (s *StructTreeReader) Err() error
func (*StructTreeReader) Next ¶
func (s *StructTreeReader) Next() bool
func (*StructTreeReader) Struct ¶
func (s *StructTreeReader) Struct() Struct
func (*StructTreeReader) Value ¶
func (s *StructTreeReader) Value() interface{}
type StructTreeWriter ¶
type StructTreeWriter struct { BaseTreeWriter // contains filtered or unexported fields }
StructTreeWriter is a TreeWriter implementation that can write a struct column type.
func NewStructTreeWriter ¶
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 ¶
func (s *StructTreeWriter) Close() error
Close closes the StructTreeWriter and its child TreeWriters returning an error if one occurs.
func (*StructTreeWriter) Encoding ¶
func (s *StructTreeWriter) Encoding() *proto.ColumnEncoding
Encoding returns the column encoding for the StructTreeWriter.
func (*StructTreeWriter) Flush ¶
func (s *StructTreeWriter) Flush() error
Flush flushes the StructTreeWriter and its child TreeWriters returning an error if one occurs.
func (*StructTreeWriter) RecordPositions ¶
func (s *StructTreeWriter) RecordPositions()
func (*StructTreeWriter) Write ¶
func (s *StructTreeWriter) Write(value interface{}) error
Write writes a value to the underlying child TreeWriters. It returns an error if one occurs.
type TimestampStatistics ¶
type TimestampStatistics struct { BaseStatistics // contains filtered or unexported fields }
func NewTimestampStatistics ¶
func NewTimestampStatistics() *TimestampStatistics
func (*TimestampStatistics) Add ¶
func (i *TimestampStatistics) Add(value interface{})
func (*TimestampStatistics) Merge ¶
func (i *TimestampStatistics) Merge(other ColumnStatistics)
func (*TimestampStatistics) Reset ¶
func (i *TimestampStatistics) Reset()
func (*TimestampStatistics) Statistics ¶
func (i *TimestampStatistics) Statistics() *proto.ColumnStatistics
type TimestampTreeReader ¶
type TimestampTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
TimestampTreeReader is a TreeReader implementation that reads timestamp type columns.
func NewTimestampTreeReader ¶
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 ¶
func (t *TimestampTreeReader) Err() error
Err implements the TreeReader interface.
func (*TimestampTreeReader) Next ¶
func (t *TimestampTreeReader) Next() bool
Next implements the TreeReader interface.
func (*TimestampTreeReader) Timestamp ¶
func (t *TimestampTreeReader) Timestamp() time.Time
ValueTimestamp returns the next timestamp value.
func (*TimestampTreeReader) Value ¶
func (t *TimestampTreeReader) Value() interface{}
Value implements the TreeReader interface.
type TimestampTreeWriter ¶
type TimestampTreeWriter struct { BaseTreeWriter // contains filtered or unexported fields }
TimestampTreeWriter is a TreeWriter implementation that writes an Timestamp type column.
func NewTimestampTreeWriter ¶
func NewTimestampTreeWriter(category Category, codec CompressionCodec) (*TimestampTreeWriter, error)
NewTimestampTreeWriter returns a new TimestampTreeWriter.
func (*TimestampTreeWriter) Close ¶
func (w *TimestampTreeWriter) Close() error
Close closes the underlying writers returning an error if one occurs.
func (*TimestampTreeWriter) Encoding ¶
func (w *TimestampTreeWriter) Encoding() *proto.ColumnEncoding
Encoding returns the column encoding used for the TimestampTreeWriter.
func (*TimestampTreeWriter) Flush ¶
func (w *TimestampTreeWriter) Flush() error
Flush flushes the underlying writers returning an error if one occurs.
func (*TimestampTreeWriter) Write ¶
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 ¶
func (w *TimestampTreeWriter) WriteTimestamp(value time.Time) error
WriteTimestamp writes an Timestamp value returning an error if one occurs.
type TimestampWriter ¶
type TimestampWriter interface { WriteTimestamp(value time.Time) error Close() error Flush() error }
TimestampWriter is an interface implemented by all Timestamp type writers.
type TreeReader ¶
TreeReader is an interface that provides methods for reading an individual stream.
type TreeWriter ¶
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 ¶
type TypeDescription struct {
// contains filtered or unexported fields
}
func NewTypeDescription ¶
func NewTypeDescription(fns ...TypeDescriptionTransformFunc) (*TypeDescription, error)
func ParseSchema ¶
func ParseSchema(schema string) (*TypeDescription, error)
func (*TypeDescription) Columns ¶
func (t *TypeDescription) Columns() []string
func (*TypeDescription) GetField ¶
func (t *TypeDescription) GetField(fieldName string) (*TypeDescription, error)
func (*TypeDescription) MarshalJSON ¶
func (t *TypeDescription) MarshalJSON() ([]byte, error)
MarshalJSON returns a json encoded byte slice of t.
func (*TypeDescription) String ¶
func (t *TypeDescription) String() string
func (*TypeDescription) ToJSON ¶
func (t *TypeDescription) ToJSON() string
ToJSON returns a json encoded string of t.
func (*TypeDescription) Type ¶
func (t *TypeDescription) Type() *proto.Type
func (*TypeDescription) Types ¶
func (t *TypeDescription) Types() []*proto.Type
type TypeDescriptionTransformFunc ¶
type TypeDescriptionTransformFunc func(t *TypeDescription) error
func AddChild ¶
func AddChild(fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc
func AddField ¶
func AddField(field string, fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc
func AddUnionChild ¶
func AddUnionChild(fns ...TypeDescriptionTransformFunc) TypeDescriptionTransformFunc
func SetCategory ¶
func SetCategory(category Category) TypeDescriptionTransformFunc
type UnionTreeReader ¶
type UnionTreeReader struct { BaseTreeReader // contains filtered or unexported fields }
UnionTreeReader is a TreeReader that reads a Union type column.
func NewUnionTreeReader ¶
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 ¶
func (u *UnionTreeReader) Err() error
Err returns the last error to have occurred.
func (*UnionTreeReader) Next ¶
func (u *UnionTreeReader) Next() bool
Next returns true if another value is available.
func (*UnionTreeReader) Value ¶
func (u *UnionTreeReader) Value() interface{}
Value returns the next value as an interface{}.
type UnionTreeWriter ¶
type UnionTreeWriter struct { BaseTreeWriter // contains filtered or unexported fields }
UnionTreeWriter is a TreeWriter implementation that can write a unionvalue column type.
func NewUnionTreeWriter ¶
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 ¶
func (s *UnionTreeWriter) Close() error
Close closes the UnionTreeWriter and its child TreeWriters returning an error if one occurs.
func (*UnionTreeWriter) Encoding ¶
func (s *UnionTreeWriter) Encoding() *proto.ColumnEncoding
Encoding returns the column encoding for the UnionTreeWriter.
func (*UnionTreeWriter) Flush ¶
func (s *UnionTreeWriter) Flush() error
Flush flushes the UnionTreeWriter and its child TreeWriters returning an error if one occurs.
func (*UnionTreeWriter) RecordPositions ¶
func (s *UnionTreeWriter) RecordPositions()
func (*UnionTreeWriter) Write ¶
func (s *UnionTreeWriter) Write(value interface{}) error
func (*UnionTreeWriter) WriteUnion ¶
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 ¶
type UnionValue struct { Tag int `json:"tag"` Value interface{} `json:"value"` }
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version is the version of the ORC file.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
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) Schema ¶
func (w *Writer) Schema() *TypeDescription
type WriterConfigFunc ¶
func AddUserMetadata ¶
func AddUserMetadata(name string, value []byte) WriterConfigFunc
func SetCompression ¶
func SetCompression(codec CompressionCodec) WriterConfigFunc
func SetSchema ¶
func SetSchema(schema *TypeDescription) WriterConfigFunc
func SetStripeTargetSize ¶
func SetStripeTargetSize(stripeTargetSize int64) WriterConfigFunc
Source 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