plain

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package plain implements the PLAIN parquet encoding.

https://github.com/apache/parquet-format/blob/master/Encodings.md#plain-plain--0

Index

Constants

View Source
const (
	ByteArrayLengthSize = 4
)

Variables

This section is empty.

Functions

func AppendBoolean

func AppendBoolean(b []byte, v bool) []byte

func AppendByteArray

func AppendByteArray(b, v []byte) []byte

func AppendDouble

func AppendDouble(b []byte, v float64) []byte

func AppendFloat

func AppendFloat(b []byte, v float32) []byte

func AppendInt32

func AppendInt32(b []byte, v int32) []byte

func AppendInt64

func AppendInt64(b []byte, v int64) []byte

func AppendInt96

func AppendInt96(b []byte, v deprecated.Int96) []byte

func Boolean

func Boolean(v bool) []byte

func ByteArray

func ByteArray(v []byte) []byte

func Double

func Double(v float64) []byte

func Float

func Float(v float32) []byte

func Int32

func Int32(v int32) []byte

func Int64

func Int64(v int64) []byte

func Int96

func Int96(v deprecated.Int96) []byte

func NextByteArray

func NextByteArray(b []byte) (v, r []byte, err error)

func PutByteArrayLength

func PutByteArrayLength(b []byte, n int)

func RangeByteArrays

func RangeByteArrays(b []byte, do func([]byte) error) (err error)

Types

type Decoder

type Decoder struct {
	encoding.NotSupportedDecoder
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) DecodeBoolean

func (d *Decoder) DecodeBoolean(data []bool) (int, error)

func (*Decoder) DecodeByteArray

func (d *Decoder) DecodeByteArray(data *encoding.ByteArrayList) (n int, err error)

func (*Decoder) DecodeDouble

func (d *Decoder) DecodeDouble(data []float64) (int, error)

func (*Decoder) DecodeFixedLenByteArray

func (d *Decoder) DecodeFixedLenByteArray(size int, data []byte) (int, error)

func (*Decoder) DecodeFloat

func (d *Decoder) DecodeFloat(data []float32) (int, error)

func (*Decoder) DecodeInt32

func (d *Decoder) DecodeInt32(data []int32) (int, error)

func (*Decoder) DecodeInt64

func (d *Decoder) DecodeInt64(data []int64) (int, error)

func (*Decoder) DecodeInt96

func (d *Decoder) DecodeInt96(data []deprecated.Int96) (int, error)

func (*Decoder) Reset

func (d *Decoder) Reset(r io.Reader)

func (*Decoder) SetBitWidth

func (d *Decoder) SetBitWidth(bitWidth int)

type DictionaryEncoding

type DictionaryEncoding struct {
}

func (DictionaryEncoding) CanEncode

func (e DictionaryEncoding) CanEncode(t format.Type) bool

func (DictionaryEncoding) Encoding

func (e DictionaryEncoding) Encoding() format.Encoding

func (DictionaryEncoding) NewDecoder

func (e DictionaryEncoding) NewDecoder(r io.Reader) encoding.Decoder

func (DictionaryEncoding) NewEncoder

func (e DictionaryEncoding) NewEncoder(w io.Writer) encoding.Encoder

func (DictionaryEncoding) String

func (e DictionaryEncoding) String() string

type Encoder

type Encoder struct {
	encoding.NotSupportedEncoder
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) EncodeBoolean

func (e *Encoder) EncodeBoolean(data []bool) error

func (*Encoder) EncodeByteArray

func (e *Encoder) EncodeByteArray(data encoding.ByteArrayList) (err error)

func (*Encoder) EncodeDouble

func (e *Encoder) EncodeDouble(data []float64) error

func (*Encoder) EncodeFixedLenByteArray

func (e *Encoder) EncodeFixedLenByteArray(size int, data []byte) error

func (*Encoder) EncodeFloat

func (e *Encoder) EncodeFloat(data []float32) error

func (*Encoder) EncodeInt32

func (e *Encoder) EncodeInt32(data []int32) error

func (*Encoder) EncodeInt64

func (e *Encoder) EncodeInt64(data []int64) error

func (*Encoder) EncodeInt96

func (e *Encoder) EncodeInt96(data []deprecated.Int96) error

func (*Encoder) Reset

func (e *Encoder) Reset(w io.Writer)

func (*Encoder) SetBitWidth

func (e *Encoder) SetBitWidth(bitWidth int)

type Encoding

type Encoding struct {
}

func (*Encoding) CanEncode

func (e *Encoding) CanEncode(format.Type) bool

func (*Encoding) Encoding

func (e *Encoding) Encoding() format.Encoding

func (*Encoding) NewDecoder

func (e *Encoding) NewDecoder(r io.Reader) encoding.Decoder

func (*Encoding) NewEncoder

func (e *Encoding) NewEncoder(w io.Writer) encoding.Encoder

func (*Encoding) String

func (e *Encoding) String() string

type Type

type Type interface {
	bool | int32 | int64 | deprecated.Int96 | float32 | float64 | byte
}

Type is a type constraint representing the possible Go types which can be represented by the PLAIN encoding.

Jump to

Keyboard shortcuts

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