Documentation ¶
Overview ¶
Package skiff implements YT skiff format.
Skiff provides very efficient encoding and decoding, but requires schema negotiation and does not support schema evolution.
Package skiff implements efficient serialization format, optimized for YT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder reads stream of skiff tuples.
Streaming format is specific for YT job input.
func NewDecoder ¶
NewDecoder creates decoder for reading rows from input stream formatted by format.
Each table schema in format must start with three system columns.
func (*Decoder) RangeIndex ¶
func (*Decoder) TableIndex ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
NewEncoder creates encoder for writing rows into w.
type Format ¶
type Format struct { // name is always equal to string "skiff" Name string `yson:",value"` // either skiff.Schema of reference into registry TableSchemas []any `yson:"table_skiff_schemas,attr"` // schemas shared between multiple tables SchemaRegistry map[string]*Schema `yson:"skiff_schema_registry,attr"` }
Format describes skiff schemas for the stream.
type Schema ¶
type Schema struct { Type WireType `yson:"wire_type"` Name string `yson:"name,omitempty"` Children []Schema `yson:"children,omitempty"` }
Schema describes wire format for the single value.
func FromTableSchema ¶
FromTableSchema creates skiff schema from table schema.
func OptionalColumn ¶
type WireType ¶
type WireType int
func FromYTType ¶
FromYTType returns skiff wire type used for transferring YT type.