Documentation
¶
Index ¶
- func NewMergeNode(agg common.AggType) common.MergeNode
- func NewQueryExecutor(tsr memCom.TableSchemaReader, topo topology.HealthTrackingDynamicTopoloy, ...) common.QueryExecutor
- type AggQueryPlan
- type BlockingScanNode
- type BrokerAQLRequest
- type BrokerSQLRequest
- type BrokerSchemaMutator
- func (b *BrokerSchemaMutator) AddColumn(table string, column common.Column, appendToArchivingSortOrder bool) (err error)
- func (b *BrokerSchemaMutator) CreateTable(table *common.Table) (err error)
- func (b *BrokerSchemaMutator) DeleteColumn(table string, column string) (err error)
- func (b *BrokerSchemaMutator) DeleteTable(name string) (err error)
- func (b *BrokerSchemaMutator) GetSchema(table string) (*memCom.TableSchema, error)
- func (b *BrokerSchemaMutator) GetSchemas() map[string]*memCom.TableSchema
- func (b *BrokerSchemaMutator) GetTable(name string) (table *common.Table, err error)
- func (b *BrokerSchemaMutator) ListTables() (tables []string, err error)
- func (b *BrokerSchemaMutator) UpdateColumn(table string, column string, config common.ColumnConfig) (err error)
- func (b *BrokerSchemaMutator) UpdateEnum(table, column string, enumList []string) error
- func (b *BrokerSchemaMutator) UpdateTable(table common.Table) (err error)
- func (b *BrokerSchemaMutator) UpdateTableConfig(table string, config common.TableConfig) (err error)
- type NonAggQueryPlan
- type QueryContext
- type QueryHandler
- type StreamingScanNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQueryExecutor ¶
func NewQueryExecutor(tsr memCom.TableSchemaReader, topo topology.HealthTrackingDynamicTopoloy, client dataCli.DataNodeQueryClient) common.QueryExecutor
NewQueryExecutor creates a new QueryExecutor
Types ¶
type AggQueryPlan ¶
type AggQueryPlan struct {
// contains filtered or unexported fields
}
AggQueryPlan is the plan for aggregate queries
func NewAggQueryPlan ¶
func NewAggQueryPlan(qc *QueryContext, topo topology.HealthTrackingDynamicTopoloy, client dataCli.DataNodeQueryClient) (plan *AggQueryPlan, err error)
NewAggQueryPlan creates a new agg query plan
func (*AggQueryPlan) Execute ¶
func (ap *AggQueryPlan) Execute(ctx context.Context, w http.ResponseWriter) (err error)
type BlockingScanNode ¶
type BlockingScanNode struct {
// contains filtered or unexported fields
}
BlockingScanNode is a BlockingPlanNode that handles rpc calls to fetch data from datanode
func (*BlockingScanNode) Add ¶
func (bpn *BlockingScanNode) Add(nodes ...common.BlockingPlanNode)
func (*BlockingScanNode) Children ¶
func (bpn *BlockingScanNode) Children() []common.BlockingPlanNode
func (*BlockingScanNode) Execute ¶
func (sn *BlockingScanNode) Execute(ctx context.Context) (result queryCom.AQLQueryResult, err error)
type BrokerAQLRequest ¶
type BrokerAQLRequest struct { // in: query Verbose int `query:"verbose,optional" json:"verbose"` // in: query Debug int `query:"debug,optional" json:"debug"` // in: header Accept string `header:"Accept,optional" json:"accept"` // in: header Origin string `header:"Rpc-Caller,optional" json:"origin"` // in: body Body struct { Query queryCom.AQLQuery `json:"query"` } `body:""` }
BrokerAQLRequest represents AQL query request. Debug mode will run **each batch** in synchronized mode and report time for each step. swagger:parameters querySQL
type BrokerSQLRequest ¶
type BrokerSQLRequest struct { // in: query Verbose int `query:"verbose,optional" json:"verbose"` // in: query Debug int `query:"debug,optional" json:"debug"` // in: header Accept string `header:"Accept,optional" json:"accept"` // in: header Origin string `header:"Rpc-Caller,optional" json:"origin"` // in: body Body struct { Query string `json:"query"` } `body:""` }
BrokerSQLRequest represents SQL query request. Debug mode will run **each batch** in synchronized mode and report time for each step. swagger:parameters querySQL
type BrokerSchemaMutator ¶
BrokerSchemaMutator implements metastore.TableSchemaMutator and memstore.TableSchemaReader, and memstore.EnumUpdater
func NewBrokerSchemaMutator ¶
func NewBrokerSchemaMutator() *BrokerSchemaMutator
func (*BrokerSchemaMutator) CreateTable ¶
func (b *BrokerSchemaMutator) CreateTable(table *common.Table) (err error)
func (*BrokerSchemaMutator) DeleteColumn ¶
func (b *BrokerSchemaMutator) DeleteColumn(table string, column string) (err error)
func (*BrokerSchemaMutator) DeleteTable ¶
func (b *BrokerSchemaMutator) DeleteTable(name string) (err error)
func (*BrokerSchemaMutator) GetSchema ¶
func (b *BrokerSchemaMutator) GetSchema(table string) (*memCom.TableSchema, error)
==== memstore/common.TableSchemaReader ====
func (*BrokerSchemaMutator) GetSchemas ¶
func (b *BrokerSchemaMutator) GetSchemas() map[string]*memCom.TableSchema
func (*BrokerSchemaMutator) GetTable ¶
func (b *BrokerSchemaMutator) GetTable(name string) (table *common.Table, err error)
func (*BrokerSchemaMutator) ListTables ¶
func (b *BrokerSchemaMutator) ListTables() (tables []string, err error)
==== metastore/common.TableSchemaMutator ====
func (*BrokerSchemaMutator) UpdateColumn ¶
func (b *BrokerSchemaMutator) UpdateColumn(table string, column string, config common.ColumnConfig) (err error)
func (*BrokerSchemaMutator) UpdateEnum ¶
func (b *BrokerSchemaMutator) UpdateEnum(table, column string, enumList []string) error
func (*BrokerSchemaMutator) UpdateTable ¶
func (b *BrokerSchemaMutator) UpdateTable(table common.Table) (err error)
func (*BrokerSchemaMutator) UpdateTableConfig ¶
func (b *BrokerSchemaMutator) UpdateTableConfig(table string, config common.TableConfig) (err error)
type NonAggQueryPlan ¶
type NonAggQueryPlan struct {
// contains filtered or unexported fields
}
NonAggQueryPlan implements QueryPlan
func NewNonAggQueryPlan ¶
func NewNonAggQueryPlan(qc *QueryContext, topo topology.HealthTrackingDynamicTopoloy, client dataCli.DataNodeQueryClient) (plan *NonAggQueryPlan, err error)
func (*NonAggQueryPlan) Execute ¶
func (nqp *NonAggQueryPlan) Execute(ctx context.Context, w http.ResponseWriter) (err error)
type QueryContext ¶
type QueryContext struct { AQLQuery *common.AQLQuery IsNonAggregationQuery bool ReturnHLLBinary bool Writer http.ResponseWriter Error error Tables []*memCom.TableSchema TableIDByAlias map[string]int TableSchemaByName map[string]*memCom.TableSchema NumDimsPerDimWidth common.DimCountsPerDimWidth // lookup table from enum dimension index to EnumDict, used for postprocessing DimensionEnumReverseDicts map[int][]string // this should be the same as generated by datanodes. in the future we should pass // it down to datanodes DimensionVectorIndex []int DimRowBytes int RequestID string }
QueryContext is broker query context
func NewQueryContext ¶
func NewQueryContext(aql *common.AQLQuery, returnHLLBinary bool, w http.ResponseWriter) *QueryContext
NewQueryContext creates new query context
func (*QueryContext) Compile ¶
func (qc *QueryContext) Compile(tableSchemaReader memCom.TableSchemaReader)
Compile parses expressions into ast, load schema from schema reader, resolve types, and collects meta data needed by post processing
type QueryHandler ¶
type QueryHandler struct {
// contains filtered or unexported fields
}
func NewQueryHandler ¶
func NewQueryHandler(executor common.QueryExecutor, instanceID string) QueryHandler
func (*QueryHandler) HandleAQL ¶
func (handler *QueryHandler) HandleAQL(w http.ResponseWriter, r *http.Request)
func (*QueryHandler) HandleSQL ¶
func (handler *QueryHandler) HandleSQL(w http.ResponseWriter, r *http.Request)
func (*QueryHandler) Register ¶
func (handler *QueryHandler) Register(router *mux.Router, wrappers ...utils.HTTPHandlerWrapper)
type StreamingScanNode ¶
type StreamingScanNode struct {
// contains filtered or unexported fields
}
StreamingScanNode implements StreamingPlanNode