inputs

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const BucketsKind = "buckets"
View Source
const FromCSVKind = "fromCSV"
View Source
const FromGeneratorKind = "fromGenerator"
View Source
const FromInfluxJSONKind = "fromInfluxJSON"
View Source
const FromKind = "from"
View Source
const FromSQLKind = "fromSQL"

Variables

This section is empty.

Functions

func CreateSourceFromDecoder

func CreateSourceFromDecoder(decoder SourceDecoder, dsid execute.DatasetID, a execute.Administration) (execute.Source, error)

CreateSourceFromDecoder takes an implementation of a SourceDecoder, as well as a dataset ID and Administration type and creates an execute.Source.

Types

type BucketsOpSpec

type BucketsOpSpec struct {
}

func (*BucketsOpSpec) Kind

func (s *BucketsOpSpec) Kind() flux.OperationKind

type BucketsProcedureSpec

type BucketsProcedureSpec struct {
	plan.DefaultCost
}

func (*BucketsProcedureSpec) Copy

func (*BucketsProcedureSpec) Kind

type CSVSource

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

func (*CSVSource) AddTransformation

func (c *CSVSource) AddTransformation(t execute.Transformation)

func (*CSVSource) Run

func (c *CSVSource) Run(ctx context.Context)

type FromCSVOpSpec

type FromCSVOpSpec struct {
	CSV  string `json:"csv"`
	File string `json:"file"`
}

func (*FromCSVOpSpec) Kind

func (s *FromCSVOpSpec) Kind() flux.OperationKind

type FromCSVProcedureSpec

type FromCSVProcedureSpec struct {
	plan.DefaultCost
	CSV  string
	File string
}

func (*FromCSVProcedureSpec) Copy

func (*FromCSVProcedureSpec) Kind

type FromDistinctRule

type FromDistinctRule struct {
}

func (FromDistinctRule) Name

func (FromDistinctRule) Name() string

func (FromDistinctRule) Pattern

func (FromDistinctRule) Pattern() plan.Pattern

func (FromDistinctRule) Rewrite

func (FromDistinctRule) Rewrite(distinctNode plan.PlanNode) (plan.PlanNode, bool, error)

type FromGeneratorOpSpec

type FromGeneratorOpSpec struct {
	Start time.Time                    `json:"start"`
	Stop  time.Time                    `json:"stop"`
	Count int64                        `json:"count"`
	Fn    *semantic.FunctionExpression `json:"fn"`
}

func (*FromGeneratorOpSpec) Kind

type FromGeneratorProcedureSpec

type FromGeneratorProcedureSpec struct {
	plan.DefaultCost
	Start time.Time
	Stop  time.Time
	Count int64
	Fn    compiler.Func
}

func (*FromGeneratorProcedureSpec) Copy

func (*FromGeneratorProcedureSpec) Kind

type FromInfluxJSONOpSpec

type FromInfluxJSONOpSpec struct {
	JSON string `json:"json"`
	File string `json:"file"`
}

FromInfluxJSONOpSpec defines the `fromInfluxJSON` function signature

func (*FromInfluxJSONOpSpec) Kind

type FromInfluxJSONProcedureSpec

type FromInfluxJSONProcedureSpec struct {
	plan.DefaultCost
	JSON string
	File string
}

FromInfluxJSONProcedureSpec describes the `fromInfluxJSON` prodecure

func (*FromInfluxJSONProcedureSpec) Copy

func (*FromInfluxJSONProcedureSpec) Kind

type FromKeysRule added in v0.13.0

type FromKeysRule struct {
}

func (FromKeysRule) Name added in v0.13.0

func (FromKeysRule) Name() string

func (FromKeysRule) Pattern added in v0.13.0

func (FromKeysRule) Pattern() plan.Pattern

func (FromKeysRule) Rewrite added in v0.13.0

func (FromKeysRule) Rewrite(keysNode plan.PlanNode) (plan.PlanNode, bool, error)

type FromOpSpec

type FromOpSpec struct {
	Bucket   string `json:"bucket,omitempty"`
	BucketID string `json:"bucketID,omitempty"`
}

func (*FromOpSpec) Kind

func (s *FromOpSpec) Kind() flux.OperationKind

type FromProcedureSpec

type FromProcedureSpec struct {
	plan.DefaultCost
	Bucket   string
	BucketID string

	BoundsSet bool
	Bounds    flux.Bounds

	FilterSet bool
	Filter    *semantic.FunctionExpression

	DescendingSet bool
	Descending    bool

	LimitSet     bool
	PointsLimit  int64
	SeriesLimit  int64
	SeriesOffset int64

	WindowSet bool
	Window    plan.WindowSpec

	GroupingSet bool
	OrderByTime bool
	GroupMode   functions.GroupMode
	GroupKeys   []string

	AggregateSet    bool
	AggregateMethod string
}

func (*FromProcedureSpec) Copy

func (*FromProcedureSpec) Kind

func (FromProcedureSpec) PostPhysicalValidate

func (s FromProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

func (*FromProcedureSpec) TimeBounds

func (s *FromProcedureSpec) TimeBounds(predecessorBounds *plan.Bounds) *plan.Bounds

TimeBounds implements plan.BoundsAwareProcedureSpec

type FromSQLOpSpec

type FromSQLOpSpec struct {
	DriverName     string `json:"driverName,omitempty"`
	DataSourceName string `json:"dataSourceName,omitempty"`
	Query          string `json:"query,omitempty"`
}

func (*FromSQLOpSpec) Kind

func (s *FromSQLOpSpec) Kind() flux.OperationKind

type FromSQLProcedureSpec

type FromSQLProcedureSpec struct {
	plan.DefaultCost
	DriverName     string
	DataSourceName string
	Query          string
}

func (*FromSQLProcedureSpec) Copy

func (*FromSQLProcedureSpec) Kind

type GeneratorSource

type GeneratorSource struct {
	Start time.Time
	Stop  time.Time
	Count int64

	Fn compiler.Func
	// contains filtered or unexported fields
}

func NewGeneratorSource

func NewGeneratorSource(a *memory.Allocator) *GeneratorSource

func (*GeneratorSource) Connect

func (s *GeneratorSource) Connect() error

func (*GeneratorSource) Decode

func (s *GeneratorSource) Decode() (flux.Table, error)

func (*GeneratorSource) Fetch

func (s *GeneratorSource) Fetch() (bool, error)

type JSONSource

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

func (*JSONSource) AddTransformation

func (c *JSONSource) AddTransformation(t execute.Transformation)

func (*JSONSource) Run

func (c *JSONSource) Run(ctx context.Context)

type MergeFromFilterRule

type MergeFromFilterRule struct {
}

MergeFromFilterRule is a rule that pushes filters into from procedures to be evaluated in the storage layer. TODO: Code that analyzes predicates should be put in platform, or anywhere sources are actually created. This is so we can tailor push down logic to actual capabilities of storage (whether InfluxDB or some other source). Also this rule is likely to be replaced by a more generic rule when we have a better framework for pushing filters, etc into sources.

func (MergeFromFilterRule) Name

func (MergeFromFilterRule) Name() string

func (MergeFromFilterRule) Pattern

func (MergeFromFilterRule) Pattern() plan.Pattern

func (MergeFromFilterRule) Rewrite

func (MergeFromFilterRule) Rewrite(filterNode plan.PlanNode) (plan.PlanNode, bool, error)

type MergeFromGroupRule

type MergeFromGroupRule struct {
}

func (MergeFromGroupRule) Name

func (MergeFromGroupRule) Name() string

func (MergeFromGroupRule) Pattern

func (MergeFromGroupRule) Pattern() plan.Pattern

func (MergeFromGroupRule) Rewrite

func (MergeFromGroupRule) Rewrite(groupNode plan.PlanNode) (plan.PlanNode, bool, error)

type MergeFromRangeRule

type MergeFromRangeRule struct{}

MergeFromRangeRule pushes a `range` into a `from`

func (MergeFromRangeRule) Name

func (rule MergeFromRangeRule) Name() string

Name returns the name of the rule

func (MergeFromRangeRule) Pattern

func (rule MergeFromRangeRule) Pattern() plan.Pattern

Pattern returns the pattern that matches `from -> range`

func (MergeFromRangeRule) Rewrite

func (rule MergeFromRangeRule) Rewrite(node plan.PlanNode) (plan.PlanNode, bool, error)

Rewrite attempts to rewrite a `from -> range` into a `FromRange`

type SQLIterator

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

func (*SQLIterator) Connect

func (c *SQLIterator) Connect() error

func (*SQLIterator) Decode

func (c *SQLIterator) Decode() (flux.Table, error)

func (*SQLIterator) Fetch

func (c *SQLIterator) Fetch() (bool, error)

type SourceDecoder

type SourceDecoder interface {
	Connect() error
	Fetch() (bool, error)
	Decode() (flux.Table, error)
}

Source Decoder is an interface that generalizes the process of retrieving data from an unspecified data source.

Connect implements the logic needed to connect directly to the data source.

Fetch implements a single fetch of data from the source (may be called multiple times). Should return false when there is no more data to retrieve.

Decode implements the process of marshaling the data returned by the source into a flux.Table type.

In executing the retrieval process, Connect is called once at the onset, and subsequent calls of Fetch() and Decode() are called iteratively until the data source is fully consumed.

Jump to

Keyboard shortcuts

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