values

package
v0.0.0-...-1947473 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package values allows conversion from Apache Arrow array to the type accepted by ClickHouse SDK The conversion can become tricky for some nested types, specifically, maps. Nullable(item) -> *scanType(item). However, non-nullable are also saved as pointers for ease of coding. Decimal(precision,scale) -> decimal.Decimal UUID -> uuid.UUID Tuple(??) -> map[string]any (arrow supports only tuples with fields) Map(keys, values) -> map[scanType(keys)]scanType(values) Array(items) -> []scanType(items)

example: Map(String, Map(UUID, Map(String, Tuple(`uint8` Nullable(UInt8), `uuid` UUID)))) -> *map[string]*map[uuid.UUID]*map[string]*map[string]any

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchAddRecords

func BatchAddRecords(ctx context.Context, batch driver.Batch, sc *arrow.Schema, records []arrow.Record) error

func FromArray

func FromArray(arr arrow.Array) (any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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