Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrFieldNotPresent indicate the field is not available in the result ErrFieldNotPresent = errors.New("field is not present") )
Functions ¶
This section is empty.
Types ¶
type MarshalElement ¶
type MarshalElement interface { Group() MarshalObject SetInt32(i int32) SetInt64(i int64) SetInt96(i [12]byte) SetFloat32(f float32) SetFloat64(f float64) SetBool(b bool) SetByteArray(data []byte) List() MarshalList Map() MarshalMap }
MarshalElement describes the interface to set the value of an element in a Marshaller implementation.
func NewMarshalElement ¶
func NewMarshalElement(data map[string]interface{}, name string) MarshalElement
NewMarshalElement creates new marshall element object
type MarshalList ¶
type MarshalList interface {
Add() MarshalElement
}
MarshalList describes the interface to add a list of values in a Marshaller implementation.
type MarshalMap ¶
type MarshalMap interface {
Add() MarshalMapElement
}
MarshalMap describes the interface to add a map of keys and values in a Marshaller implementation.
type MarshalMapElement ¶
type MarshalMapElement interface { Key() MarshalElement Value() MarshalElement }
MarshalMapElement describes the interfaces to set an individual pair of keys and values in a Marshaller implementation.
type MarshalObject ¶
type MarshalObject interface { AddField(field string) MarshalElement GetData() map[string]interface{} }
MarshalObject is the interface a Marshaller needs to marshall its data to.
func NewMarshallObject ¶
func NewMarshallObject(data map[string]interface{}) MarshalObject
NewMarshallObject creates a new marshaller object
func NewMarshallObjectWithSchema ¶
func NewMarshallObjectWithSchema(data map[string]interface{}, schemaDef *parquetschema.SchemaDefinition) MarshalObject
NewMarshallObjectWithSchema creates a new marshaller object with a particular schema.
type Marshaller ¶
type Marshaller interface {
MarshalParquet(obj MarshalObject) error
}
Marshaller is the interface necessary for objects to be marshalled when passed to the (*Writer).WriteRecord method.
type UnmarshalElement ¶
type UnmarshalElement interface { Group() (UnmarshalObject, error) Int32() (int32, error) Int64() (int64, error) Int96() ([12]byte, error) Float32() (float32, error) Float64() (float64, error) Bool() (bool, error) ByteArray() ([]byte, error) List() (UnmarshalList, error) Map() (UnmarshalMap, error) Error() error }
UnmarshalElement describes the interface to get the value of an element in an Unmarshaller implementation.
func NewUnmarshallElement ¶
func NewUnmarshallElement(data interface{}) UnmarshalElement
NewUnmarshallElement creates new unmarshall element object
type UnmarshalList ¶
type UnmarshalList interface { Next() bool Value() (UnmarshalElement, error) }
UnmarshalList describes the interface to get the values of a list in an Unmarshaller implementation.
type UnmarshalMap ¶
type UnmarshalMap interface { Next() bool Key() (UnmarshalElement, error) Value() (UnmarshalElement, error) }
UnmarshalMap describes the interface to get key-value pairs of a map in an Unmarshaller implementation.
type UnmarshalObject ¶
type UnmarshalObject interface { GetField(field string) UnmarshalElement GetData() map[string]interface{} }
UnmarshalObject is the interface an Unmarshaller needs to unmarshal its data from.
func NewUnmarshallObject ¶
func NewUnmarshallObject(data map[string]interface{}) UnmarshalObject
NewUnmarshallObject creates a new unmarshaller object
type Unmarshaller ¶
type Unmarshaller interface {
UnmarshalParquet(obj UnmarshalObject) error
}
Unmarshaller is the interface necessary for objects to be unmarshalled.