Documentation ¶
Index ¶
- func BoolType(se *sch.SchemaElement)
- func Float32Type(se *sch.SchemaElement)
- func Float64Type(se *sch.SchemaElement)
- func GetBools(r io.Reader, n int, pageSizes []int) ([]bool, error)
- func Int32Type(se *sch.SchemaElement)
- func Int64Type(se *sch.SchemaElement)
- func OptionalFieldSnappy(r *OptionalField)
- func OptionalFieldUncompressed(o *OptionalField)
- func PageHeader(r io.Reader) (*sch.PageHeader, error)
- func PageHeaders(footer *sch.FileMetaData, r io.ReadSeeker) ([]sch.PageHeader, error)
- func PageHeadersAtOffset(r io.ReadSeeker, o, n int64) ([]sch.PageHeader, error)
- func Pfloat32(f float32) *float32
- func Pfloat64(f float64) *float64
- func Pint32(i int32) *int32
- func Pint64(i int64) *int64
- func Puint32(i uint32) *uint32
- func Puint64(i uint64) *uint64
- func ReadMetaData(r io.ReadSeeker) (*sch.FileMetaData, error)
- func RepetitionOptional(se *sch.SchemaElement)
- func RepetitionRepeated(se *sch.SchemaElement)
- func RepetitionRequired(se *sch.SchemaElement)
- func RequiredFieldSnappy(r *RequiredField)
- func RequiredFieldUncompressed(r *RequiredField)
- func StringType(se *sch.SchemaElement)
- func Uint32Type(se *sch.SchemaElement)
- func Uint64Type(se *sch.SchemaElement)
- type Field
- type FieldFunc
- type IntStats
- type MaxLevel
- type Metadata
- func (m *Metadata) Footer(w io.Writer) error
- func (m *Metadata) NextDoc()
- func (m *Metadata) Pages() (map[string][]Page, error)
- func (m *Metadata) ReadFooter(r io.ReadSeeker) error
- func (m *Metadata) RowGroups() []RowGroup
- func (m *Metadata) Rows() int64
- func (m *Metadata) StartRowGroup(fields ...Field)
- func (m *Metadata) WritePageHeader(w io.Writer, pth []string, dataLen, compressedLen, defCount, count int, ...) error
- type OptionalField
- func (f *OptionalField) DoRead(r io.ReadSeeker, pg Page) (io.Reader, []int, error)
- func (f *OptionalField) DoWrite(w io.Writer, meta *Metadata, vals []byte, count int, stats Stats) error
- func (f *OptionalField) Key() string
- func (f *OptionalField) Name() string
- func (f *OptionalField) NilCount() *int64
- func (f *OptionalField) Path() []string
- func (f *OptionalField) Values() int
- type Page
- type RequiredField
- func (f *RequiredField) DoRead(r io.ReadSeeker, pg Page) (io.Reader, []int, error)
- func (f *RequiredField) DoWrite(w io.Writer, meta *Metadata, vals []byte, count int, stats Stats) error
- func (f *RequiredField) Key() string
- func (f *RequiredField) Name() string
- func (f *RequiredField) Path() []string
- type RowGroup
- type Stats
- type UintStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolType ¶
func BoolType(se *sch.SchemaElement)
func Float32Type ¶
func Float32Type(se *sch.SchemaElement)
func Float64Type ¶
func Float64Type(se *sch.SchemaElement)
func Int32Type ¶
func Int32Type(se *sch.SchemaElement)
func Int64Type ¶
func Int64Type(se *sch.SchemaElement)
func OptionalFieldSnappy ¶ added in v0.1.0
func OptionalFieldSnappy(r *OptionalField)
OptionalFieldSnappy sets the compression for a column to snappy It is an optional arg to NewOptionalField
func OptionalFieldUncompressed ¶ added in v0.1.0
func OptionalFieldUncompressed(o *OptionalField)
OptionalFieldUncompressed sets the compression to none It is an optional arg to NewOptionalField
func PageHeader ¶ added in v0.2.0
func PageHeader(r io.Reader) (*sch.PageHeader, error)
PageHeader reads the page header from a column page
func PageHeaders ¶ added in v0.2.0
func PageHeaders(footer *sch.FileMetaData, r io.ReadSeeker) ([]sch.PageHeader, error)
func PageHeadersAtOffset ¶ added in v0.2.0
func PageHeadersAtOffset(r io.ReadSeeker, o, n int64) ([]sch.PageHeader, error)
func ReadMetaData ¶ added in v0.1.0
func ReadMetaData(r io.ReadSeeker) (*sch.FileMetaData, error)
ReadMetaData reads the FileMetaData from the end of a parquet file
func RepetitionOptional ¶
func RepetitionOptional(se *sch.SchemaElement)
func RepetitionRepeated ¶ added in v0.3.0
func RepetitionRepeated(se *sch.SchemaElement)
func RepetitionRequired ¶
func RepetitionRequired(se *sch.SchemaElement)
func RequiredFieldSnappy ¶ added in v0.1.0
func RequiredFieldSnappy(r *RequiredField)
RequiredFieldSnappy sets the compression for a column to snappy It is an optional arg to NewRequiredField
func RequiredFieldUncompressed ¶ added in v0.1.0
func RequiredFieldUncompressed(r *RequiredField)
RequiredFieldUncompressed sets the compression to none It is an optional arg to NewRequiredField
func StringType ¶
func StringType(se *sch.SchemaElement)
func Uint32Type ¶
func Uint32Type(se *sch.SchemaElement)
func Uint64Type ¶
func Uint64Type(se *sch.SchemaElement)
Types ¶
type FieldFunc ¶
type FieldFunc func(*sch.SchemaElement)
FieldFunc is used to set some of the metadata for each column
type IntStats ¶ added in v0.2.0
type IntStats struct {
// contains filtered or unexported fields
}
RequiredField writes the raw data for required columns
func NewIntStats ¶ added in v0.2.0
func (IntStats) Statistics ¶ added in v0.2.0
func (i IntStats) Statistics(min, max int64) *sch.Statistics
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata keeps track of the things that need to be kept track of in order to write the FileMetaData at the end of the parquet file.
func (*Metadata) NextDoc ¶ added in v0.3.0
func (m *Metadata) NextDoc()
NextDoc keeps track of how many documents have been added to this parquet file. The final value of m.docs is used for the FileMetaData.NumRows
func (*Metadata) ReadFooter ¶
func (m *Metadata) ReadFooter(r io.ReadSeeker) error
ReadFooter reads the parquet metadata
func (*Metadata) StartRowGroup ¶
StartRowGroup is called when starting a new row group
type OptionalField ¶ added in v0.0.6
type OptionalField struct { Defs []uint8 Reps []uint8 MaxLevels MaxLevel RepetitionType FieldFunc Types []int // contains filtered or unexported fields }
func NewOptionalField ¶ added in v0.0.6
func NewOptionalField(pth []string, types []int, opts ...func(*OptionalField)) OptionalField
func (*OptionalField) DoRead ¶ added in v0.0.6
func (f *OptionalField) DoRead(r io.ReadSeeker, pg Page) (io.Reader, []int, error)
DoRead is called by all optional fields. It reads the definition levels and uses them to interpret the raw data.
func (*OptionalField) DoWrite ¶ added in v0.0.6
func (f *OptionalField) DoWrite(w io.Writer, meta *Metadata, vals []byte, count int, stats Stats) error
DoWrite is called by all optional field types to write the definition levels and raw data to the io.Writer
func (*OptionalField) Key ¶ added in v0.2.0
func (f *OptionalField) Key() string
func (*OptionalField) Name ¶ added in v0.0.6
func (f *OptionalField) Name() string
Name returns the column name of this field
func (*OptionalField) NilCount ¶ added in v0.2.0
func (f *OptionalField) NilCount() *int64
func (*OptionalField) Path ¶ added in v0.2.0
func (f *OptionalField) Path() []string
func (*OptionalField) Values ¶ added in v0.0.6
func (f *OptionalField) Values() int
Values reads the definition levels and uses them to return the values from the page data.
type Page ¶ added in v0.1.0
type Page struct { // N is the number of values in the ColumnChunk N int Size int Offset int64 Codec sch.CompressionCodec }
Page keeps track of metadata for each ColumnChunk
type RequiredField ¶ added in v0.0.6
type RequiredField struct {
// contains filtered or unexported fields
}
func NewRequiredField ¶ added in v0.0.6
func NewRequiredField(pth []string, opts ...func(*RequiredField)) RequiredField
NewRequiredField creates a new required field.
func (*RequiredField) DoRead ¶ added in v0.0.6
func (f *RequiredField) DoRead(r io.ReadSeeker, pg Page) (io.Reader, []int, error)
func (*RequiredField) DoWrite ¶ added in v0.0.6
func (f *RequiredField) DoWrite(w io.Writer, meta *Metadata, vals []byte, count int, stats Stats) error
DoWrite writes the actual raw data.
func (*RequiredField) Key ¶ added in v0.2.0
func (f *RequiredField) Key() string
func (*RequiredField) Name ¶ added in v0.0.6
func (f *RequiredField) Name() string
func (*RequiredField) Path ¶ added in v0.2.0
func (f *RequiredField) Path() []string
type RowGroup ¶ added in v0.0.6
type RowGroup struct { Rows int64 // contains filtered or unexported fields }
RowGroup wraps schema.RowGroup and adds accounting functions that are used to keep track of number of rows written, byte size, etc.
func (*RowGroup) Columns ¶ added in v0.0.6
func (r *RowGroup) Columns() []*sch.ColumnChunk
Columns returns the Columns of the row group.
type UintStats ¶ added in v0.2.0
type UintStats struct {
// contains filtered or unexported fields
}
func NewUintStats ¶ added in v0.2.0
func (UintStats) Statistics ¶ added in v0.2.0
func (i UintStats) Statistics(min, max uint64) *sch.Statistics