entities

package
v0.0.0-...-bbf0bf7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateTimeFieldSpec

type DateTimeFieldSpec struct {
	Name        string `json:"name"`
	DataType    string `json:"dataType"`
	Format      string `json:"format,omitempty"`
	Granularity string `json:"granularity,omitempty"`
}

type DateTimeFormatPatternSpec

type DateTimeFormatPatternSpec struct {
	Pattern  string
	TimeZone string
}

func NewDateTimeFormatPatternSpec

func NewDateTimeFormatPatternSpec(format TimeFormat, pattern, timeZone string) (DateTimeFormatPatternSpec, error)

type DateTimeFormatSpec

type DateTimeFormatSpec struct {
	Size        int
	UnitSpec    time.Duration
	PatternSpec DateTimeFormatPatternSpec
}

func NewDateTimeFormatSpec

func NewDateTimeFormatSpec(format string) (*DateTimeFormatSpec, error)

type DimensionFieldSpec

type DimensionFieldSpec struct {
	Name             string      `json:"name"`
	DataType         string      `json:"dataType"`
	SingleValueField bool        `json:"singleValueField,omitempty"`
	Nullable         bool        `json:"nullable,omitempty"`
	DefaultNullValue interface{} `json:"defaultNullValue,omitempty"`
}

type GranularitySpec

type GranularitySpec struct {
	Size     int64
	UnitSpec time.Duration
}

func NewGranularitySpec

func NewGranularitySpec(format string) (*GranularitySpec, error)

type MetricFieldSpec

type MetricFieldSpec struct {
	Name             string      `json:"name"`
	DataType         string      `json:"dataType"`
	Nullable         bool        `json:"nullable,omitempty"`
	DefaultNullValue interface{} `json:"defaultNullValue,omitempty"`
}

type Schema

type Schema struct {
	Name                string                `json:"name"`
	DimensionFieldSpecs []*DimensionFieldSpec `json:"dimensionFieldSpecs"`
	MetricFieldSpecs    []*MetricFieldSpec    `json:"metricFieldSpecs,omitempty"`
	DateTimeFieldSpecs  *DateTimeFieldSpec    `json:"dateTimeFieldSpecs"`
}

func (*Schema) GetDatetimeField

func (s *Schema) GetDatetimeField() arrow.Field

func (*Schema) GetDatetimeFormat

func (s *Schema) GetDatetimeFormat() (*DateTimeFormatSpec, error)

func (*Schema) GetDimensionField

func (s *Schema) GetDimensionField(name string) *DimensionFieldSpec

func (*Schema) GetDimensionFields

func (s *Schema) GetDimensionFields() []arrow.Field

func (*Schema) GetFullArrowSchema

func (s *Schema) GetFullArrowSchema() (*arrow.Schema, error)

func (*Schema) GetGranularity

func (s *Schema) GetGranularity() (*GranularitySpec, error)

func (*Schema) GetMetricFields

func (s *Schema) GetMetricFields() []arrow.Field

func (*Schema) Validate

func (s *Schema) Validate(dt types.DataType) error

type Table

type Table struct {
	Name        string        `json:"name"`
	Schema      *Schema       `json:"schema"`
	EventSchema *arrow.Schema `json:"-"`
}

func NewTable

func NewTable(name string, schema *Schema) (*Table, error)

func (*Table) GetDatetimeField

func (t *Table) GetDatetimeField() arrow.Field

func (*Table) GetDimensionFields

func (t *Table) GetDimensionFields() []arrow.Field

func (*Table) GetMetricFields

func (t *Table) GetMetricFields() []arrow.Field

type TimeFormat

type TimeFormat string
const (
	EPOCH              TimeFormat = "EPOCH"
	TIMESTAMP          TimeFormat = "TIMESTAMP"
	SIMPLE_DATE_FORMAT TimeFormat = "SIMPLE_DATE_FORMAT"
)

Jump to

Keyboard shortcuts

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