Documentation ¶
Index ¶
- type AggregationResult
- type BrokerResponse
- type ClientConfig
- type Connection
- type Exception
- type GroupValue
- type ReadZNode
- type Request
- type RespSchema
- type ResultTable
- func (r ResultTable) Get(rowIndex int, columnIndex int) interface{}
- func (r ResultTable) GetColumnCount() int
- func (r ResultTable) GetColumnDataType(columnIndex int) string
- func (r ResultTable) GetColumnName(columnIndex int) string
- func (r ResultTable) GetDouble(rowIndex int, columnIndex int) float64
- func (r ResultTable) GetFloat(rowIndex int, columnIndex int) float32
- func (r ResultTable) GetInt(rowIndex int, columnIndex int) int32
- func (r ResultTable) GetLong(rowIndex int, columnIndex int) int64
- func (r ResultTable) GetRowCount() int
- func (r ResultTable) GetString(rowIndex int, columnIndex int) string
- type SelectionResults
- type ZookeeperConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationResult ¶
type AggregationResult struct { Function string `json:"function"` Value string `json:"value,omitempty"` GroupByColumns []string `json:"groupByColumns,omitempty"` GroupByResult []GroupValue `json:"groupByResult,omitempty"` }
AggregationResult is the data structure for PQL aggregation result
type BrokerResponse ¶
type BrokerResponse struct { AggregationResults []*AggregationResult `json:"aggregationResults,omitempty"` SelectionResults *SelectionResults `json:"SelectionResults,omitempty"` ResultTable *ResultTable `json:"resultTable,omitempty"` Exceptions []Exception `json:"exceptions"` TraceInfo map[string]string `json:"traceInfo,omitempty"` NumServersQueried int `json:"numServersQueried"` NumServersResponded int `json:"numServersResponded"` NumSegmentsQueried int `json:"numSegmentsQueried"` NumSegmentsProcessed int `json:"numSegmentsProcessed"` NumSegmentsMatched int `json:"numSegmentsMatched"` NumConsumingSegmentsQueried int `json:"numConsumingSegmentsQueried"` NumDocsScanned int64 `json:"numDocsScanned"` NumEntriesScannedInFilter int64 `json:"numEntriesScannedInFilter"` NumEntriesScannedPostFilter int64 `json:"numEntriesScannedPostFilter"` NumGroupsLimitReached bool `json:"numGroupsLimitReached"` TotalDocs int64 `json:"totalDocs"` TimeUsedMs int `json:"timeUsedMs"` MinConsumingFreshnessTimeMs int64 `json:"minConsumingFreshnessTimeMs"` }
BrokerResponse is the data structure for broker response.
type ClientConfig ¶
type ClientConfig struct { // Request header ExtraHTTPHeader map[string]string // Zookeeper Configs ZkConfig *ZookeeperConfig // BrokerList BrokerList []string }
ClientConfig configs to create a PinotDbConnection
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection to Pinot, normally created through calls to the {@link ConnectionFactory}.
func NewFromBrokerList ¶
func NewFromBrokerList(brokerList []string) (*Connection, error)
NewFromBrokerList create a new Pinot connection with pre configured Pinot Broker list.
func NewFromZookeeper ¶
func NewFromZookeeper(zkPath []string, zkPathPrefix string, pinotCluster string) (*Connection, error)
NewFromZookeeper create a new Pinot connection through Pinot Zookeeper.
func NewWithConfig ¶
func NewWithConfig(config *ClientConfig) (*Connection, error)
NewWithConfig create a new Pinot connection.
func (*Connection) ExecutePQL ¶
func (c *Connection) ExecutePQL(table string, query string) (*BrokerResponse, error)
ExecutePQL for a given table
func (*Connection) ExecuteSQL ¶
func (c *Connection) ExecuteSQL(table string, query string) (*BrokerResponse, error)
ExecuteSQL for a given table
type GroupValue ¶
GroupValue is the data structure for PQL aggregation GroupBy result
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request is used in server request to host multiple pinot query types, like PQL, SQL.
type RespSchema ¶
type RespSchema struct { ColumnDataTypes []string `json:"columnDataTypes"` ColumnNames []string `json:"columnNames"` }
RespSchema is response schema
type ResultTable ¶
type ResultTable struct { DataSchema RespSchema `json:"dataSchema"` Rows [][]interface{} `json:"rows"` }
ResultTable is a ResultTable
func (ResultTable) Get ¶
func (r ResultTable) Get(rowIndex int, columnIndex int) interface{}
Get returns a ResultTable entry given row index and column index
func (ResultTable) GetColumnCount ¶
func (r ResultTable) GetColumnCount() int
GetColumnCount returns how many columns in the ResultTable
func (ResultTable) GetColumnDataType ¶
func (r ResultTable) GetColumnDataType(columnIndex int) string
GetColumnDataType returns column data type given column index
func (ResultTable) GetColumnName ¶
func (r ResultTable) GetColumnName(columnIndex int) string
GetColumnName returns column name given column index
func (ResultTable) GetDouble ¶
func (r ResultTable) GetDouble(rowIndex int, columnIndex int) float64
GetDouble returns a ResultTable double entry given row index and column index
func (ResultTable) GetFloat ¶
func (r ResultTable) GetFloat(rowIndex int, columnIndex int) float32
GetFloat returns a ResultTable float entry given row index and column index
func (ResultTable) GetInt ¶
func (r ResultTable) GetInt(rowIndex int, columnIndex int) int32
GetInt returns a ResultTable int entry given row index and column index
func (ResultTable) GetLong ¶
func (r ResultTable) GetLong(rowIndex int, columnIndex int) int64
GetLong returns a ResultTable long entry given row index and column index
func (ResultTable) GetRowCount ¶
func (r ResultTable) GetRowCount() int
GetRowCount returns how many rows in the ResultTable
type SelectionResults ¶
type SelectionResults struct { Columns []string `json:"columns"` Results [][]string `json:"results"` }
SelectionResults is the data structure for PQL aggregation result
type ZookeeperConfig ¶
ZookeeperConfig describes how to config Pinot Zookeeper connection