bigslice: github.com/grailbio/bigslice/slicetype Index | Files

package slicetype

import "github.com/grailbio/bigslice/slicetype"

Package slicetype implements data types and utilities to describe Bigslice types: Slices, Frames, and Tasks all carry slicetype.Types.

Index

Package Files

slicetype.go

func Assignable Uses

func Assignable(in, out Type) bool

Assignable reports whether column type in can be assigned to out.

func Columns Uses

func Columns(typ Type) []reflect.Type

Columns returns a slice of column types from the provided type.

func String Uses

func String(typ Type) string

type Type Uses

type Type interface {
    // NumOut returns the number of columns.
    NumOut() int
    // Out returns the data type of the ith column.
    Out(i int) reflect.Type
    // Prefix returns the number of columns in the type
    // which are considered the type's prefix. A type's
    // prefix is the set of columns which are considered
    // the type's key columns for operations like reduce.
    Prefix() int
}

A Type is the type of a set of columns.

func Append Uses

func Append(t1, t2 Type) Type

func Concat Uses

func Concat(types ...Type) Type

func New Uses

func New(types ...reflect.Type) Type

New returns a new Type using the provided column types.

func Slice Uses

func Slice(t Type, i, j int) Type

Bugs

prefixes are lost when slicing a type.

Package slicetype imports 3 packages (graph) and is imported by 7 packages. Updated 2019-10-02. Refresh now. Tools for package owners.