internal

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DataValueWidth = 128 // max width of 32 bit float string in bytes

Variables

This section is empty.

Functions

func MapXtoY

func MapXtoY[X interface{}, Y interface{}](collection []X, fn func(elem X) Y) []Y

Types

type CartesianProduct

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

func NewCartesianProduct

func NewCartesianProduct(input [][]string) CartesianProduct

func (*CartesianProduct) All

func (c *CartesianProduct) All() [][]string

func (*CartesianProduct) Next

func (c *CartesianProduct) Next() ([]string, bool)

func (*CartesianProduct) NextP

func (c *CartesianProduct) NextP(ret *[]*string) bool

type HeaderParseState

type HeaderParseState struct {
	Count              int
	Quotes             int
	Semicolons         int
	Equals             int
	SquarebracketOpen  int
	SquarebracketClose int
	ParenthesisOpen    int
	ParenthesisClose   int
}

type Parser

type Parser struct {
	CubeWriter StatCubeWriter
	// contains filtered or unexported fields
}

func (*Parser) Header

func (p *Parser) Header(keyword string, language string, subkeys []string) []string

func (*Parser) ParseDataDense

func (p *Parser) ParseDataDense(reader *bufio.Reader)

func (*Parser) ParseHeader

func (p *Parser) ParseHeader(reader *bufio.Reader)

func (*Parser) ParseHeaderCharacter

func (p *Parser) ParseHeaderCharacter(c byte) (stop bool, err error)

TIMEVAL and HIERARCHY not yet supported beyond passing them through.

type PxHeaderRow

type PxHeaderRow struct {
	Keyword  string
	Language string
	Subkeys  []string
	Values   []string
}

func (*PxHeaderRow) Equals

func (r *PxHeaderRow) Equals(keyword string, language string, subkeys []string) bool

type RowAccumulator

type RowAccumulator struct {
	Keyword  string
	Language string
	Subkey   string
	Subkeys  []string
	Value    string
	Values   []string
}

func (*RowAccumulator) ToRow

func (r *RowAccumulator) ToRow() PxHeaderRow

type StatCubeCsvWriter

type StatCubeCsvWriter struct {
	Writer *bufio.Writer
}

func (*StatCubeCsvWriter) WriteFooting

func (w *StatCubeCsvWriter) WriteFooting()

func (*StatCubeCsvWriter) WriteHeading

func (w *StatCubeCsvWriter) WriteHeading(stub, headingCsv []string)

func (*StatCubeCsvWriter) WriteRow

func (w *StatCubeCsvWriter) WriteRow(stubs *[]*string, values *[][]byte,
	valueLengths *[]int, stubWidth, headingWidth int)

type StatCubeParquetWriter

type StatCubeParquetWriter struct {
	Values        [][]float32
	Writer        *bufio.Writer
	ParquetWriter *file.Writer
	// contains filtered or unexported fields
}

func (*StatCubeParquetWriter) WriteFooting

func (w *StatCubeParquetWriter) WriteFooting()

func (*StatCubeParquetWriter) WriteHeading

func (w *StatCubeParquetWriter) WriteHeading(stub, headingCsv []string)

func (*StatCubeParquetWriter) WriteRow

func (w *StatCubeParquetWriter) WriteRow(stubs *[]*string, values *[][]byte,
	valueLengths *[]int, stubWidth, headingWidth int)

type StatCubeWriter

type StatCubeWriter interface {
	WriteHeading(stub, headingCsv []string)

	// Yes, the signature is a bit funny, but it's like this to optimize
	// the way data is laid out in a tight loop that has to avoid allocs.
	WriteRow(stubs *[]*string, values *[][]byte,
		valueLengths *[]int, stubWidth, headingWidth int)

	WriteFooting()
}

Jump to

Keyboard shortcuts

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