common

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitNum

func BitNum(num uint64) uint64

Get the number of bits needed by the num; 0 needs 0, 1 need 1, 2 need 2, 3 need 2 ....

func Cmp

func Cmp(ai interface{}, bi interface{}, pT *parquet.Type, cT *parquet.ConvertedType) bool

Compare two values: a<b return true a>=b return false

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(a interface{}, b interface{}, pT *parquet.Type, cT *parquet.ConvertedType) interface{}

Get the maximum of two parquet values

func Min

func Min(a interface{}, b interface{}, pT *parquet.Type, cT *parquet.ConvertedType) interface{}

Get the minimum of two parquet values

func NewSchemaElementFromTagMap

func NewSchemaElementFromTagMap(info *Tag) *parquet.SchemaElement

func PathToStr

func PathToStr(path []string) string

Convert path slice to string

func SizeOf

func SizeOf(val reflect.Value) int64

Get the size of a parquet value

func StrToPath

func StrToPath(str string) []string

Convert string to path slice

Types

type Tag

type Tag struct {
	InName string
	ExName string

	Type      string
	KeyType   string
	ValueType string

	BaseType      string
	KeyBaseType   string
	ValueBaseType string

	Length      int32
	KeyLength   int32
	ValueLength int32

	Scale      int32
	KeyScale   int32
	ValueScale int32

	Precision      int32
	KeyPrecision   int32
	ValuePrecision int32

	FieldID      int32
	KeyFieldID   int32
	ValueFieldID int32

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

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

`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