Documentation
¶
Overview ¶
Package orcio reads and writes Apache ORC files for the SQL engines (specification: https://orc.apache.org/specification/ORCv1/).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBadFile is returned when the bytes are not a readable ORC file. ErrBadFile = errors.New("invalid orc file") // ErrUnsupported is returned for ORC features this package does not implement. ErrUnsupported = errors.New("unsupported orc feature") // ErrBadValue is returned when a cell does not parse as its column type. ErrBadValue = errors.New("invalid orc cell value") )
Functions ¶
Types ¶
type Column ¶
type Column struct {
// NestedIDs gives iceberg.id attributes to nested members by logical path ("col.member",
// "col.element", "col.key", "col.value").
NestedIDs map[string]int
Name string
Type string
// FieldID is written as the iceberg.id type attribute when positive.
FieldID int
}
Column is one top-level column to write; Type is a Hive/Athena type name.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is an opened ORC file held in memory.
func (*File) ColumnIDs ¶
ColumnIDs maps each top-level Iceberg field id (the iceberg.id type attribute) to its column name.
func (*File) ForEach ¶
ForEach streams every row, yielding one value per requested column (case-insensitive; nil when null or absent). Leaf values are bool, int64, float64 or string (date, timestamp and decimal are formatted as Athena prints them); nested columns yield map[string]any / []any.