Documentation
¶
Index ¶
- Variables
- func ArrowSchemaToProto(schema *arrow.Schema) proto.DataType_Struct
- func ArrowTypeToProto(dataType arrow.DataType) *proto.DataType
- func ReadArrowBatchToRecord(data []byte, schema *StructType) (arrow.Record, error)
- type Binary
- type BinaryNilType
- type BinaryType
- type Boolean
- type BooleanNilType
- type BooleanType
- type ByteType
- type DataType
- type DateType
- type DecimalType
- type DoubleType
- type Float32
- type Float32NilType
- type Float64
- type Float64NilType
- type FloatType
- type Int
- type Int16
- type Int16NilType
- type Int32
- type Int32NilType
- type Int64
- type Int64NilType
- type Int8
- type Int8NilType
- type IntNilType
- type IntegerType
- type LiteralType
- type LongType
- type NumericLiteral
- type PrimitiveTypeLiteral
- type Row
- type ShortType
- type String
- type StringNilType
- type StringType
- type StructField
- type StructType
- type TimestampNtzType
- type TimestampType
- type UnsupportedType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BOOLEAN = BooleanType{} BYTE = ByteType{} SHORT = ShortType{} INTEGER = IntegerType{} LONG = LongType{} FLOAT = FloatType{} DOUBLE = DoubleType{} DATE = DateType{} TIMESTAMP = TimestampType{} TIMESTAMP_NTZ = TimestampNtzType{} STRING = StringType{} )
View Source
var BinaryNil = BinaryNilType{}
View Source
var BooleanNil = BooleanNilType{}
View Source
var Float32Nil = Float32NilType{}
View Source
var Float64Nil = Float64NilType{}
View Source
var Int16Nil = Int16NilType{}
View Source
var Int32Nil = Int32NilType{}
View Source
var Int64Nil = Int64NilType{}
View Source
var Int8Nil = Int8NilType{}
View Source
var IntNil = IntNilType{}
View Source
var StringNil = StringNilType{}
Functions ¶
func ArrowSchemaToProto ¶
func ArrowSchemaToProto(schema *arrow.Schema) proto.DataType_Struct
func ReadArrowBatchToRecord ¶
func ReadArrowBatchToRecord(data []byte, schema *StructType) (arrow.Record, error)
Types ¶
type BinaryNilType ¶
type BinaryNilType struct{}
func (BinaryNilType) ToProto ¶
func (t BinaryNilType) ToProto(ctx context.Context) (*proto.Expression, error)
type BinaryType ¶
type BinaryType struct{}
func (BinaryType) IsNumeric ¶
func (t BinaryType) IsNumeric() bool
func (BinaryType) ToArrowType ¶
func (t BinaryType) ToArrowType() arrow.DataType
func (BinaryType) TypeName ¶
func (t BinaryType) TypeName() string
type BooleanNilType ¶
type BooleanNilType struct{}
func (BooleanNilType) ToProto ¶
func (t BooleanNilType) ToProto(ctx context.Context) (*proto.Expression, error)
type BooleanType ¶
type BooleanType struct{}
func (BooleanType) IsNumeric ¶
func (t BooleanType) IsNumeric() bool
func (BooleanType) ToArrowType ¶
func (t BooleanType) ToArrowType() arrow.DataType
func (BooleanType) TypeName ¶
func (t BooleanType) TypeName() string
type DataType ¶
func ConvertProtoDataTypeToDataType ¶
ConvertProtoDataTypeToDataType converts protobuf data type to Spark connect sql data type
type DecimalType ¶
func (DecimalType) IsNumeric ¶
func (t DecimalType) IsNumeric() bool
func (DecimalType) ToArrowType ¶
func (t DecimalType) ToArrowType() arrow.DataType
func (DecimalType) TypeName ¶
func (t DecimalType) TypeName() string
type DoubleType ¶
type DoubleType struct{}
func (DoubleType) IsNumeric ¶
func (t DoubleType) IsNumeric() bool
func (DoubleType) ToArrowType ¶
func (t DoubleType) ToArrowType() arrow.DataType
func (DoubleType) TypeName ¶
func (t DoubleType) TypeName() string
type Float32NilType ¶
type Float32NilType struct{}
func (Float32NilType) ToProto ¶
func (t Float32NilType) ToProto(ctx context.Context) (*proto.Expression, error)
type Float64NilType ¶
type Float64NilType struct{}
func (Float64NilType) ToProto ¶
func (t Float64NilType) ToProto(ctx context.Context) (*proto.Expression, error)
type Int16NilType ¶
type Int16NilType struct{}
func (Int16NilType) ToProto ¶
func (t Int16NilType) ToProto(ctx context.Context) (*proto.Expression, error)
type Int32NilType ¶
type Int32NilType struct{}
func (Int32NilType) ToProto ¶
func (t Int32NilType) ToProto(ctx context.Context) (*proto.Expression, error)
type Int64NilType ¶
type Int64NilType struct{}
func (Int64NilType) ToProto ¶
func (t Int64NilType) ToProto(ctx context.Context) (*proto.Expression, error)
type Int8NilType ¶
type Int8NilType struct{}
func (Int8NilType) ToProto ¶
func (t Int8NilType) ToProto(ctx context.Context) (*proto.Expression, error)
type IntNilType ¶
type IntNilType struct{}
func (IntNilType) ToProto ¶
func (t IntNilType) ToProto(ctx context.Context) (*proto.Expression, error)
type IntegerType ¶
type IntegerType struct{}
func (IntegerType) IsNumeric ¶
func (t IntegerType) IsNumeric() bool
func (IntegerType) ToArrowType ¶
func (t IntegerType) ToArrowType() arrow.DataType
func (IntegerType) TypeName ¶
func (t IntegerType) TypeName() string
type LiteralType ¶
type LiteralType interface {
ToProto(ctx context.Context) (*proto.Expression, error)
}
type NumericLiteral ¶
type NumericLiteral interface { LiteralType // contains filtered or unexported methods }
type PrimitiveTypeLiteral ¶
type PrimitiveTypeLiteral interface { LiteralType // contains filtered or unexported methods }
type Row ¶
type Row interface { // At returns field's value at the given index within a [Row]. // It returns nil for invalid indices. At(index int) any // Value returns field's value of the given column's name within a [Row]. // It returns nil for invalid column's name. Value(name string) any // Values returns values of all fields within a [Row] as a slice of any. Values() []any // Len returns the number of fields within a [Row] Len() int FieldNames() []string }
type StringNilType ¶
type StringNilType struct{}
func (StringNilType) ToProto ¶
func (t StringNilType) ToProto(ctx context.Context) (*proto.Expression, error)
type StringType ¶
type StringType struct{}
func (StringType) IsNumeric ¶
func (t StringType) IsNumeric() bool
func (StringType) ToArrowType ¶
func (t StringType) ToArrowType() arrow.DataType
func (StringType) TypeName ¶
func (t StringType) TypeName() string
type StructField ¶
type StructField struct { Name string DataType DataType Nullable bool // default should be true Metadata *string }
StructField represents a field in a StructType.
func ConvertProtoStructField ¶
func ConvertProtoStructField(field *generated.DataType_StructField) StructField
func ConvertProtoStructFields ¶
func ConvertProtoStructFields(input []*generated.DataType_StructField) []StructField
func NewStructField ¶
func NewStructField(name string, dataType DataType) StructField
func (*StructField) ToArrowType ¶
func (t *StructField) ToArrowType() arrow.Field
type StructType ¶
type StructType struct {
Fields []StructField
}
StructType represents a struct type.
func ConvertProtoDataTypeToStructType ¶
func ConvertProtoDataTypeToStructType(input *generated.DataType) (*StructType, error)
func StructOf ¶
func StructOf(fields ...StructField) *StructType
func (*StructType) IsNumeric ¶
func (t *StructType) IsNumeric() bool
func (*StructType) ToArrowType ¶
func (t *StructType) ToArrowType() *arrow.StructType
func (*StructType) TypeName ¶
func (t *StructType) TypeName() string
type TimestampNtzType ¶
type TimestampNtzType struct{}
func (TimestampNtzType) IsNumeric ¶
func (t TimestampNtzType) IsNumeric() bool
func (TimestampNtzType) ToArrowType ¶
func (t TimestampNtzType) ToArrowType() arrow.DataType
func (TimestampNtzType) TypeName ¶
func (t TimestampNtzType) TypeName() string
type TimestampType ¶
type TimestampType struct{}
func (TimestampType) IsNumeric ¶
func (t TimestampType) IsNumeric() bool
func (TimestampType) ToArrowType ¶
func (t TimestampType) ToArrowType() arrow.DataType
func (TimestampType) TypeName ¶
func (t TimestampType) TypeName() string
type UnsupportedType ¶
type UnsupportedType struct {
TypeInfo any
}
func (UnsupportedType) IsNumeric ¶
func (t UnsupportedType) IsNumeric() bool
func (UnsupportedType) ToArrowType ¶
func (t UnsupportedType) ToArrowType() arrow.DataType
func (UnsupportedType) TypeName ¶
func (t UnsupportedType) TypeName() string
Click to show internal directories.
Click to hide internal directories.