columntypes

package
v0.0.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseType

func BaseType(chType string) string

BaseType strips modifiers from the given ClickHouse type, if possible

func LegacyIsDecimal

func LegacyIsDecimal(originalType string) bool

func Restore

func Restore(column abstract.ColSchema, val interface{}) interface{}

func ToChType

func ToChType(ytType string) string

func ToYtType

func ToYtType(chType string) (ytType string, required bool)

ToYtType converts the given ClickHouse type to YT type and a requiredness flag.

XXX: support all types from system.data_type_families, such as Decimal, Tuple, Array, Nested, Array(Array(...))

Types

type TypeDescription

type TypeDescription struct {
	IsString     bool
	IsDecimal    bool
	IsArray      bool
	IsDateTime64 bool
	IsDateTime   bool
	IsDate       bool
	YtBaseType   string
	IsInteger    bool
	// contains filtered or unexported fields
}

func NewTypeDescription

func NewTypeDescription(chTypeName string) *TypeDescription

func (*TypeDescription) DateTime64Precision

func (t *TypeDescription) DateTime64Precision() int

type TypeMapping

type TypeMapping map[string]*TypeDescription

Jump to

Keyboard shortcuts

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