Documentation
¶
Index ¶
- func GroupByUserWindow(records []arrow.Record, window time.Duration) (map[int64]float64, error)
- type Aggregation
- type Condition
- type Filter
- type GroupBy
- type Operator
- type Plan
- type Planner
- type Query
- func (q *Query) Aggregate(column string, agg Aggregation) *Query
- func (q *Query) Desc(desc bool) *Query
- func (q *Query) Execute() (*QueryResult, error)
- func (q *Query) GroupByColumns(columns ...string) *Query
- func (q *Query) Having(column string, op Operator, value interface{}) *Query
- func (q *Query) Limit(limit int64) *Query
- func (q *Query) OrderBy(columns ...string) *Query
- func (q *Query) Select(columns ...string) *Query
- func (q *Query) Where(column string, op Operator, value interface{}) *Query
- func (q *Query) WithWindow(window time.Duration) *Query
- type QueryResult
- type StreamingQuery
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aggregation ¶
type Aggregation string
Aggregation represents a SQL aggregation function
const ( Sum Aggregation = "SUM" Avg Aggregation = "AVG" Count Aggregation = "COUNT" Min Aggregation = "MIN" Max Aggregation = "MAX" )
type Filter ¶
type Filter struct {
Column string
Operator Operator // Use the existing Operator type
Value interface{}
}
Filter represents a query filter condition
type Plan ¶
type Plan struct {
ColumnPruning []string // Columns needed
Filters []Filter // Push-down filters
Aggregations []Aggregation // Early aggregations
IndexStrategies map[string]index.Strategy
}
Plan represents a query execution plan
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
Planner optimizes query execution
func NewPlanner ¶
func NewPlanner(im *index.IndexManager) *Planner
NewPlanner creates a query planner
type Query ¶
type Query struct {
Columns []string // Columns to select
Aggregates map[string]Aggregation // Column -> Aggregation type
GroupBy *GroupBy
Window *Window
// contains filtered or unexported fields
}
Query represents a SQL-like query structure
func (*Query) Aggregate ¶
func (q *Query) Aggregate(column string, agg Aggregation) *Query
Aggregate adds an aggregation
func (*Query) Execute ¶
func (q *Query) Execute() (*QueryResult, error)
Execute runs the query and returns the results
func (*Query) GroupByColumns ¶
GroupByColumns adds group by columns
type QueryResult ¶
QueryResult holds the result of a query execution
type StreamingQuery ¶
type StreamingQuery struct {
// contains filtered or unexported fields
}
StreamingQuery represents a continuous query
func NewStreamingQuery ¶
func NewStreamingQuery(q *Query, p *Planner) (*StreamingQuery, error)
NewStreamingQuery creates a new streaming query
Click to show internal directories.
Click to hide internal directories.