arrowtests

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	EventSchema = arrow.NewSchema(
		[]arrow.Field{
			{Name: "time", Type: arrow.FixedWidthTypes.Time32ms},
			{Name: "value", Type: arrow.PrimitiveTypes.Float64},
			{Name: "quality", Type: arrow.PrimitiveTypes.Int64},
		}, nil,
	)
)

Functions

func NewTSRecord

func NewTSRecord() (*arrow.Schema, arrow.Record)

NewTSRecord Create a new sample base on eventSchema

func PrintRecordColumns

func PrintRecordColumns(rec arrow.Record)

PrintRecordColumns Print a columns based output

Example
_, rec := NewTSRecord()
defer rec.Release()

PrintRecordColumns(rec)
Output:

column[0] "time": [1 2 3 4]
column[1] "value": [7 8 (null) 10]
column[2] "quality": [42 42 41 42]

func PrintRecordRows

func PrintRecordRows(schema *arrow.Schema, recs []arrow.Record)

PrintRecordRows Print a row based output

Example
s, rec := NewTSRecord()
defer rec.Release()

PrintRecordRows(s, []arrow.Record{rec})
Output:

time: 1 , value: 7 , quality: 42
time: 2 , value: 8 , quality: 42
time: 3 , value: <nil> , quality: 41
time: 4 , value: 10 , quality: 42

Types

type Event

type Event struct {
	Time  arrow.Time32
	Value interface{}
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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