common

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PAR_GO_PATH_DELIMITER = "\x01"

Variables

This section is empty.

Functions

func CmpIntBinary

func CmpIntBinary(as string, bs string, order string, signed bool) bool

func DeepCopy

func DeepCopy(src, dst interface{})

func HeadToUpper

func HeadToUpper(str string) string

Convert the first letter of a string to uppercase

func Max

func Max(table FuncTable, a interface{}, b interface{}) interface{}

func Min

func Min(table FuncTable, a interface{}, b interface{}) interface{}

func NewLogicalTypeFromConvertedType added in v1.7.0

func NewLogicalTypeFromConvertedType(schemaElement *parquet.SchemaElement, info *Tag) *parquet.LogicalType

func NewLogicalTypeFromFieldsMap added in v1.7.0

func NewLogicalTypeFromFieldsMap(mp map[string]string) *parquet.LogicalType

func NewSchemaElementFromTagMap

func NewSchemaElementFromTagMap(info *Tag) *parquet.SchemaElement

func PathStrIndex added in v1.4.0

func PathStrIndex(str string) int

Get the pathStr index in a path

func PathToStr

func PathToStr(path []string) string

Convert path slice to string

func ReformPathStr added in v1.7.0

func ReformPathStr(pathStr string) string

. -> \x01

func SizeOf

func SizeOf(val reflect.Value) int64

Get the size of a parquet value

func Str2Bool added in v1.7.0

func Str2Bool(val string) bool

func Str2Int32 added in v1.7.0

func Str2Int32(val string) int32

func StrToPath

func StrToPath(str string) []string

Convert string to path slice

func StringToVariableName added in v1.7.0

func StringToVariableName(str string) string

Convert string to a golang variable name

Types

type FuncTable added in v1.7.0

type FuncTable interface {
	LessThan(a interface{}, b interface{}) bool
	MinMaxSize(minVal interface{}, maxVal interface{}, val interface{}) (interface{}, interface{}, int32)
}

func FindFuncTable added in v1.7.0

func FindFuncTable(pT *parquet.Type, cT *parquet.ConvertedType, logT *parquet.LogicalType) FuncTable

type Tag

type Tag struct {
	InName string
	ExName string

	Type      string
	KeyType   string
	ValueType string

	ConvertedType      string
	KeyConvertedType   string
	ValueConvertedType string

	Length      int32
	KeyLength   int32
	ValueLength int32

	Scale      int32
	KeyScale   int32
	ValueScale int32

	Precision      int32
	KeyPrecision   int32
	ValuePrecision int32

	IsAdjustedToUTC      bool
	KeyIsAdjustedToUTC   bool
	ValueIsAdjustedToUTC bool

	FieldID      int32
	KeyFieldID   int32
	ValueFieldID int32

	Encoding      parquet.Encoding
	KeyEncoding   parquet.Encoding
	ValueEncoding parquet.Encoding

	OmitStats      bool
	KeyOmitStats   bool
	ValueOmitStats bool

	RepetitionType      parquet.FieldRepetitionType
	KeyRepetitionType   parquet.FieldRepetitionType
	ValueRepetitionType parquet.FieldRepetitionType

	LogicalTypeFields      map[string]string
	KeyLogicalTypeFields   map[string]string
	ValueLogicalTypeFields map[string]string
}

`parquet:"name=Name, type=FIXED_LEN_BYTE_ARRAY, length=12"`

func GetKeyTagMap

func GetKeyTagMap(src *Tag) *Tag

Get key tag map for map

func GetValueTagMap

func GetValueTagMap(src *Tag) *Tag

Get value tag map for map

func NewTag

func NewTag() *Tag

func StringToTag

func StringToTag(tag string) *Tag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL