arrow: github.com/apache/arrow/go/arrow/internal/arrjson Index | Files

package arrjson

import "github.com/apache/arrow/go/arrow/internal/arrjson"

Package arrjson provides types and functions to encode and decode ARROW types and data to and from JSON files.

Index

Package Files

arrjson.go option.go reader.go writer.go

type Array Uses

type Array struct {
    Name     string        `json:"name"`
    Count    int           `json:"count"`
    Valids   []int         `json:"VALIDITY,omitempty"`
    Data     []interface{} `json:"DATA,omitempty"`
    Offset   []int32       `json:"OFFSET,omitempty"`
    Children []Array       `json:"children,omitempty"`
}

type Field Uses

type Field struct {
    Name     string   `json:"name"`
    Type     dataType `json:"type"`
    Nullable bool     `json:"nullable"`
    Children []Field  `json:"children"`
}

type Option Uses

type Option func(*config)

Option is a functional option to configure opening or creating Arrow files and streams.

func WithAllocator Uses

func WithAllocator(mem memory.Allocator) Option

WithAllocator specifies the Arrow memory allocator used while building records.

func WithSchema Uses

func WithSchema(schema *arrow.Schema) Option

WithSchema specifies the Arrow schema to be used for reading or writing.

type Reader Uses

type Reader struct {
    // contains filtered or unexported fields
}

func NewReader Uses

func NewReader(r io.Reader, opts ...Option) (*Reader, error)

func (*Reader) NumRecords Uses

func (r *Reader) NumRecords() int

func (*Reader) Read Uses

func (r *Reader) Read() (array.Record, error)

func (*Reader) Release Uses

func (r *Reader) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed. Release may be called simultaneously from multiple goroutines.

func (*Reader) Retain Uses

func (r *Reader) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Reader) Schema Uses

func (r *Reader) Schema() *arrow.Schema

type Record Uses

type Record struct {
    Count   int64   `json:"count"`
    Columns []Array `json:"columns"`
}

type Schema Uses

type Schema struct {
    Fields []Field `json:"fields"`
}

type Writer Uses

type Writer struct {
    // contains filtered or unexported fields
}

func NewWriter Uses

func NewWriter(w io.Writer, schema *arrow.Schema) (*Writer, error)

func (*Writer) Close Uses

func (w *Writer) Close() error

func (*Writer) Write Uses

func (w *Writer) Write(rec array.Record) error

Package arrjson imports 13 packages (graph). Updated 2020-08-13. Refresh now. Tools for package owners.