internal

package
v1.20.6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecimalToFloat

func DecimalToFloat(fieldAttr ReinterpretField, iface interface{}) (*float64, error)

func NewCSVWriter

func NewCSVWriter(option WriteOption, schema []string) (*writer.CSVWriter, error)

func NewJSONWriter

func NewJSONWriter(option WriteOption, schema string) (*writer.JSONWriter, error)

func NewParquetFileReader

func NewParquetFileReader(option ReadOption) (*reader.ParquetReader, error)

func NewParquetFileWriter

func NewParquetFileWriter(option WriteOption) (source.ParquetFile, error)

func StringToBytes

func StringToBytes(fieldAttr ReinterpretField, value string) []byte

func TimeUnitToTag

func TimeUnitToTag(timeUnit *parquet.TimeUnit) string

Types

type CommonOption

type CommonOption struct {
	URI string `arg:"" predictor:"file" help:"URI of Parquet file."`
}

CommonOption represents common options across most commands

type GoStructNode

type GoStructNode struct {
	SchemaNode
}

func NewGoStructNode

func NewGoStructNode(s SchemaNode) GoStructNode

func (GoStructNode) String

func (n GoStructNode) String() (string, error)

type JSONSchema

type JSONSchema struct {
	Tag    string
	Fields []JSONSchema `json:",omitempty"`
}

type JSONSchemaNode

type JSONSchemaNode struct {
	SchemaNode
}

func NewJSONSchemaNode

func NewJSONSchemaNode(s SchemaNode) JSONSchemaNode

func (JSONSchemaNode) Schema

func (s JSONSchemaNode) Schema() JSONSchema

type ReadOption

type ReadOption struct {
	CommonOption
	HTTPMultipleConnection bool              `help:"(HTTP URI only) use multiple HTTP connection." default:"false"`
	HTTPIgnoreTLSError     bool              `help:"(HTTP URI only) ignore TLS error." default:"false"`
	HTTPExtraHeaders       map[string]string `mapsep:"," help:"(HTTP URI only) extra HTTP headers." default:""`
	ObjectVersion          string            `help:"(S3 URI only) object version." default:""`
	Anonymous              bool              `help:"(S3 and Azure only) object is publicly accessible." default:"false"`
}

ReadOption includes options for read operation

type ReinterpretField

type ReinterpretField struct {
	ParquetType   parquet.Type
	ConvertedType parquet.ConvertedType
	Precision     int
	Scale         int
}

type SchemaNode

type SchemaNode struct {
	parquet.SchemaElement
	Parent   []string      `json:"-"`
	Children []*SchemaNode `json:"children,omitempty"`
}

func NewSchemaTree

func NewSchemaTree(reader *reader.ParquetReader) *SchemaNode

func (*SchemaNode) GetReinterpretFields

func (s *SchemaNode) GetReinterpretFields(rootPath string, noInterimLayer bool) map[string]ReinterpretField

type WriteOption

type WriteOption struct {
	CommonOption
	Compression string `` /* 128-byte string literal not displayed */
}

WriteOption includes options for write operation

Jump to

Keyboard shortcuts

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