internal

package
v1.25.14 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: BSD-3-Clause Imports: 30 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(uri string, option WriteOption, schema []string) (*writer.CSVWriter, error)

func NewGenericWriter added in v1.23.0

func NewGenericWriter(uri string, option WriteOption, schema string) (*writer.ParquetWriter, error)

func NewJSONWriter

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

func NewParquetFileReader

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

func NewParquetFileWriter

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

func StringToBytes

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

func TimeUnitToTag

func TimeUnitToTag(timeUnit *parquet.TimeUnit) string

Types

type JSONSchema

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

type ReadOption

type ReadOption struct {
	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, option SchemaOption) (*SchemaNode, error)

func (SchemaNode) CSVSchema added in v1.21.1

func (s SchemaNode) CSVSchema() (string, error)

func (*SchemaNode) GetReinterpretFields

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

func (SchemaNode) GoStruct added in v1.21.1

func (s SchemaNode) GoStruct() (string, error)

func (SchemaNode) JSONSchema added in v1.21.1

func (s SchemaNode) JSONSchema() string

type SchemaOption added in v1.24.0

type SchemaOption struct {
	FailOnInt96 bool
}

type WriteOption

type WriteOption struct {
	Compression string `` /* 144-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