types

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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

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

func DECIMAL_INT_ToString

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

func INT96ToTime

func INT96ToTime(int96 string) time.Time

func InterfaceToParquetType

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

func IsUint added in v1.0.4

func IsUint(kind reflect.Kind) bool

func JSONTypeToParquetType

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

func ParquetTypeToGoReflectType

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

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

func TIMESTAMP_MILLISToTime

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

func TIMESTAMP_NANOSToTime

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

func TimeToINT96

func TimeToINT96(t time.Time) string

func TimeToTIMESTAMP_MICROS

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

func TimeToTIMESTAMP_MILLIS

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

func TimeToTIMESTAMP_NANOS

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

func TimeToTIME_MICROS

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

func TimeToTIME_MILLIS

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