types

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 75

Documentation

Index

Constants

View Source
const (
	JULIAN_DAY_OF_EPOCH int64 = 2440588
	MICROS_PER_DAY      int64 = 3600 * 24 * 1000 * 1000
)

From Spark https://github.com/apache/spark/blob/b9f2f78de59758d1932c1573338539e485a01112/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala#L47

Variables

This section is empty.

Functions

func DECIMAL_BYTE_ARRAY_ToString added in v1.6.0

func DECIMAL_BYTE_ARRAY_ToString(dec []byte, precision int, scale int) string

func DECIMAL_INT_ToString added in v1.6.0

func DECIMAL_INT_ToString(dec int64, precision int, scale int) string

func INT96ToTime added in v1.6.0

func INT96ToTime(int96 string) time.Time

func InterfaceToParquetType added in v1.6.0

func InterfaceToParquetType(src interface{}, pT *parquet.Type) interface{}

func JSONTypeToParquetType

func JSONTypeToParquetType(val reflect.Value, pT *parquet.Type, cT *parquet.ConvertedType, length int, scale int) (interface{}, error)

func ParquetTypeToGoReflectType added in v1.4.0

func ParquetTypeToGoReflectType(pT *parquet.Type, rT *parquet.FieldRepetitionType) reflect.Type

func StrIntToBinary

func StrIntToBinary(num string, order string, length int, signed bool) string

order=LittleEndian or BigEndian; length is byte num

func StrToParquetType

func StrToParquetType(s string, pT *parquet.Type, cT *parquet.ConvertedType, length int, scale int) (interface{}, error)

Scan a string to parquet value; length and scale just for decimal

func TIMESTAMP_MICROSToTime added in v1.6.0

func TIMESTAMP_MICROSToTime(micros int64, adjustedToUTC bool) time.Time

func TIMESTAMP_MILLISToTime added in v1.6.0

func TIMESTAMP_MILLISToTime(millis int64, adjustedToUTC bool) time.Time

func TIMESTAMP_NANOSToTime added in v1.6.0

func TIMESTAMP_NANOSToTime(nanos int64, adjustedToUTC bool) time.Time

func TimeToINT96 added in v1.6.0

func TimeToINT96(t time.Time) string

func TimeToTIMESTAMP_MICROS added in v1.6.0

func TimeToTIMESTAMP_MICROS(t time.Time, adjustedToUTC bool) int64

func TimeToTIMESTAMP_MILLIS added in v1.6.0

func TimeToTIMESTAMP_MILLIS(t time.Time, adjustedToUTC bool) int64

func TimeToTIMESTAMP_NANOS added in v1.6.0

func TimeToTIMESTAMP_NANOS(t time.Time, adjustedToUTC bool) int64

func TimeToTIME_MICROS added in v1.6.0

func TimeToTIME_MICROS(t time.Time, adjustedToUTC bool) int64

func TimeToTIME_MILLIS added in v1.6.0

func TimeToTIME_MILLIS(t time.Time, adjustedToUTC bool) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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