bigslice: Index | Files

package slicetype

import ""

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


Package Files


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 Signature Uses

func Signature(arg, ret Type) string

Signature returns a Go function signature for a function that takes the provided arguments and returns the provided values.

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


prefixes are lost when slicing a type.

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