Documentation ¶
Index ¶
- Variables
- func AddRecordValue(rowBuilder *parquet.RowBuilder, recordType *schema_pb.RecordType, ...) error
- func ListOf(elementType *schema_pb.Type) *schema_pb.Type
- func StructToSchema(instance any) *schema_pb.RecordType
- func ToParquetSchema(topicName string, recordType *schema_pb.RecordType) (*parquet.Schema, error)
- func ToRecordValue(recordType *schema_pb.RecordType, parquetLevels *ParquetLevels, ...) (*schema_pb.RecordValue, error)
- func ToValue(t *schema_pb.Type, levels *ParquetLevels, values []parquet.Value, ...) (value *schema_pb.Value, endValueIndex int, err error)
- type ParquetLevels
- type RecordTypeBuilder
- type RecordValueBuilder
- func (rvb *RecordValueBuilder) RecordEnd() *schema_pb.RecordValue
- func (rvb *RecordValueBuilder) SetBool(key string, value bool) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetBoolList(key string, values ...bool) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetBytes(key string, value []byte) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetBytesList(key string, values ...[]byte) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetDouble(key string, value float64) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetDoubleList(key string, values ...float64) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetFloat(key string, value float32) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetFloatList(key string, values ...float32) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetInt32(key string, value int32) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetInt32List(key string, values ...int32) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetInt64(key string, value int64) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetInt64List(key string, values ...int64) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetRecord(key string, value *schema_pb.RecordValue) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetRecordList(key string, values ...*schema_pb.RecordValue) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetString(key string, value string) *RecordValueBuilder
- func (rvb *RecordValueBuilder) SetStringList(key string, values ...string) *RecordValueBuilder
- type Schema
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeBoolean = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_BOOL}} TypeInt32 = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_INT32}} TypeInt64 = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_INT64}} TypeFloat = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_FLOAT}} TypeDouble = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_DOUBLE}} TypeBytes = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_BYTES}} TypeString = &schema_pb.Type{Kind: &schema_pb.Type_ScalarType{schema_pb.ScalarType_STRING}} )
Functions ¶
func AddRecordValue ¶
func AddRecordValue(rowBuilder *parquet.RowBuilder, recordType *schema_pb.RecordType, parquetLevels *ParquetLevels, recordValue *schema_pb.RecordValue) error
func StructToSchema ¶
func StructToSchema(instance any) *schema_pb.RecordType
func ToParquetSchema ¶
func ToRecordValue ¶
func ToRecordValue(recordType *schema_pb.RecordType, parquetLevels *ParquetLevels, row parquet.Row) (*schema_pb.RecordValue, error)
ToRecordValue converts a parquet.Row to a schema_pb.RecordValue This does not work or did not test with nested structures. Using this may fail to convert the parquet.Row to schema_pb.RecordValue
Types ¶
type ParquetLevels ¶
type ParquetLevels struct {
// contains filtered or unexported fields
}
func ToParquetLevels ¶
func ToParquetLevels(recordType *schema_pb.RecordType) (*ParquetLevels, error)
type RecordTypeBuilder ¶
type RecordTypeBuilder struct {
// contains filtered or unexported fields
}
func RecordTypeBegin ¶
func RecordTypeBegin() *RecordTypeBuilder
func (*RecordTypeBuilder) RecordTypeEnd ¶
func (rtb *RecordTypeBuilder) RecordTypeEnd() *schema_pb.RecordType
func (*RecordTypeBuilder) WithField ¶
func (rtb *RecordTypeBuilder) WithField(name string, scalarType *schema_pb.Type) *RecordTypeBuilder
func (*RecordTypeBuilder) WithRecordField ¶
func (rtb *RecordTypeBuilder) WithRecordField(name string, recordType *schema_pb.RecordType) *RecordTypeBuilder
type RecordValueBuilder ¶
type RecordValueBuilder struct {
// contains filtered or unexported fields
}
RecordValueBuilder helps in constructing RecordValue protobuf messages
func RecordBegin ¶
func RecordBegin() *RecordValueBuilder
RecordBegin creates a new RecordValueBuilder instance
func (*RecordValueBuilder) RecordEnd ¶
func (rvb *RecordValueBuilder) RecordEnd() *schema_pb.RecordValue
RecordEnd returns the constructed RecordValue message
func (*RecordValueBuilder) SetBool ¶
func (rvb *RecordValueBuilder) SetBool(key string, value bool) *RecordValueBuilder
func (*RecordValueBuilder) SetBoolList ¶
func (rvb *RecordValueBuilder) SetBoolList(key string, values ...bool) *RecordValueBuilder
func (*RecordValueBuilder) SetBytes ¶
func (rvb *RecordValueBuilder) SetBytes(key string, value []byte) *RecordValueBuilder
func (*RecordValueBuilder) SetBytesList ¶
func (rvb *RecordValueBuilder) SetBytesList(key string, values ...[]byte) *RecordValueBuilder
func (*RecordValueBuilder) SetDouble ¶
func (rvb *RecordValueBuilder) SetDouble(key string, value float64) *RecordValueBuilder
func (*RecordValueBuilder) SetDoubleList ¶
func (rvb *RecordValueBuilder) SetDoubleList(key string, values ...float64) *RecordValueBuilder
func (*RecordValueBuilder) SetFloat ¶
func (rvb *RecordValueBuilder) SetFloat(key string, value float32) *RecordValueBuilder
func (*RecordValueBuilder) SetFloatList ¶
func (rvb *RecordValueBuilder) SetFloatList(key string, values ...float32) *RecordValueBuilder
func (*RecordValueBuilder) SetInt32 ¶
func (rvb *RecordValueBuilder) SetInt32(key string, value int32) *RecordValueBuilder
func (*RecordValueBuilder) SetInt32List ¶
func (rvb *RecordValueBuilder) SetInt32List(key string, values ...int32) *RecordValueBuilder
func (*RecordValueBuilder) SetInt64 ¶
func (rvb *RecordValueBuilder) SetInt64(key string, value int64) *RecordValueBuilder
func (*RecordValueBuilder) SetInt64List ¶
func (rvb *RecordValueBuilder) SetInt64List(key string, values ...int64) *RecordValueBuilder
func (*RecordValueBuilder) SetRecord ¶
func (rvb *RecordValueBuilder) SetRecord(key string, value *schema_pb.RecordValue) *RecordValueBuilder
func (*RecordValueBuilder) SetRecordList ¶
func (rvb *RecordValueBuilder) SetRecordList(key string, values ...*schema_pb.RecordValue) *RecordValueBuilder
func (*RecordValueBuilder) SetString ¶
func (rvb *RecordValueBuilder) SetString(key string, value string) *RecordValueBuilder
func (*RecordValueBuilder) SetStringList ¶
func (rvb *RecordValueBuilder) SetStringList(key string, values ...string) *RecordValueBuilder
Click to show internal directories.
Click to hide internal directories.