Documentation
¶
Index ¶
- Constants
- func AggsFastPathWrapper(req *structs.SegmentSearchRequest, parallelismPerFile int64, ...)
- func ApplyAgileTree(str *segread.AgileTreeReader, aggs *structs.QueryAggregators, ...)
- func ApplyColumnarSearchQuery(query *SearchQuery, multiColReader *segread.MultiColSegmentReader, ...) (bool, error)
- func CanDoStarTree(segKey string, aggs *structs.QueryAggregators, qid uint64) (bool, *segread.AgileTreeReader)
- func GetAggColsAndTimestamp(aggs *structs.QueryAggregators) (map[string]bool, map[string]utils.AggColUsageMode, map[string]bool)
- func PerformAggsOnRecs(nodeResult *structs.NodeResult, aggs *structs.QueryAggregators, ...) map[string]bool
- func PerformGroupByRequestAggsOnRecs(nodeResult *structs.NodeResult, recs map[string]map[string]interface{}, ...) map[string]bool
- func PerformMeasureAggsOnRecs(nodeResult *structs.NodeResult, recs map[string]map[string]interface{}, ...) map[string]bool
- func RawComputeSegmentStats(req *structs.SegmentSearchRequest, fileParallelism int64, ...) (map[string]*structs.SegStats, error)
- func RawSearchMetricsSegment(mQuery *structs.MetricsQuery, tsidInfo *tsidtracker.AllMatchedTSIDs, ...)
- func RawSearchPQMResults(req *structs.SegmentSearchRequest, fileParallelism int64, ...)
- func RawSearchSegmentFileWrapper(req *structs.SegmentSearchRequest, parallelismPerFile int64, ...)
- type BlockRecordIterator
- type BlockSearchStatus
- type SegmentSearchStatus
- func InitBlocksForAggsFastPath(searchReq *structs.SegmentSearchRequest, blkSum []*structs.BlockSummary) *SegmentSearchStatus
- func InitBlocksToSearch(searchReq *structs.SegmentSearchRequest, blkSum []*structs.BlockSummary, ...) *SegmentSearchStatus
- func RawSearchSingleQuery(query *structs.SearchQuery, searchReq *structs.SegmentSearchRequest, ...) *SegmentSearchStatus
Constants ¶
const BLOCK_BATCH_SIZE = 100
const PQMR_INITIAL_SIZE = 15000
Variables ¶
This section is empty.
Functions ¶
func AggsFastPathWrapper ¶
func AggsFastPathWrapper(req *structs.SegmentSearchRequest, parallelismPerFile int64, searchNode *structs.SearchNode, timeRange *dtu.TimeRange, sizeLimit uint64, aggs *structs.QueryAggregators, allSearchResults *segresults.SearchResults, qid uint64, qs *summary.QuerySummary)
func ApplyAgileTree ¶
func ApplyAgileTree(str *segread.AgileTreeReader, aggs *structs.QueryAggregators, allSearchResults *segresults.SearchResults, sizeLimit uint64, qid uint64, agileTreeBuf []byte)
func ApplyColumnarSearchQuery ¶
func ApplyColumnarSearchQuery(query *SearchQuery, multiColReader *segread.MultiColSegmentReader, blockNum uint16, recordNum uint16, holderDte *DtypeEnclosure, qid uint64, dictEncColNames map[string]bool, searchReq *SegmentSearchRequest, cmiPassedCnames map[string]bool) (bool, error)
TODO: support for complex expressions
func CanDoStarTree ¶
func CanDoStarTree(segKey string, aggs *structs.QueryAggregators, qid uint64) (bool, *segread.AgileTreeReader)
func GetAggColsAndTimestamp ¶
func GetAggColsAndTimestamp(aggs *structs.QueryAggregators) (map[string]bool, map[string]utils.AggColUsageMode, map[string]bool)
returns all columns in aggs and the timestamp column
func PerformAggsOnRecs ¶
func RawComputeSegmentStats ¶
func RawComputeSegmentStats(req *structs.SegmentSearchRequest, fileParallelism int64, searchNode *structs.SearchNode, timeRange *dtu.TimeRange, measureOps []*structs.MeasureAggregator, allSearchResults *segresults.SearchResults, qid uint64, qs *summary.QuerySummary) (map[string]*structs.SegStats, error)
This function raw compute segment stats and will return a map[string]*structs.SegStats, for all the measureOps parameter This function will check for timestamp and so should be used for partially enclosed segments, and unrotated segments.
func RawSearchMetricsSegment ¶
func RawSearchMetricsSegment(mQuery *structs.MetricsQuery, tsidInfo *tsidtracker.AllMatchedTSIDs, req *structs.MetricsSearchRequest, res *mresults.MetricsResult, timeRange *dtu.MetricsTimeRange, qid uint64, querySummary *summary.QuerySummary)
func RawSearchPQMResults ¶
func RawSearchPQMResults(req *structs.SegmentSearchRequest, fileParallelism int64, timeRange *dtu.TimeRange, aggs *structs.QueryAggregators, sizeLimit uint64, spqmr *pqmr.SegmentPQMRResults, allSearchResults *segresults.SearchResults, qid uint64, querySummary *summary.QuerySummary)
func RawSearchSegmentFileWrapper ¶
func RawSearchSegmentFileWrapper(req *structs.SegmentSearchRequest, parallelismPerFile int64, searchNode *structs.SearchNode, timeRange *dtu.TimeRange, sizeLimit uint64, aggs *structs.QueryAggregators, allSearchResults *segresults.SearchResults, qid uint64, qs *summary.QuerySummary)
Types ¶
type BlockRecordIterator ¶
type BlockRecordIterator struct { AllRecords *pqmr.PQMatchResults // allrecords in block AllRecLen uint16 // contains filtered or unexported fields }
func InitIteratorFromPQMR ¶
func InitIteratorFromPQMR(pqmr *pqmr.PQMatchResults, nRecs uint) *BlockRecordIterator
func (*BlockRecordIterator) ShouldProcessRecord ¶
func (bss *BlockRecordIterator) ShouldProcessRecord(idx uint) bool
func (*BlockRecordIterator) UnsetRecord ¶
func (bss *BlockRecordIterator) UnsetRecord(idx uint)
set idx bit to 0. This function can be used to remove records that dont match timestamps
type BlockSearchStatus ¶
type BlockSearchStatus struct { BlockNum uint16 // block number of search // contains filtered or unexported fields }
func (*BlockSearchStatus) GetRecordIteratorCopyForBlock ¶
func (bss *BlockSearchStatus) GetRecordIteratorCopyForBlock(op utils.LogicalOperator) (*BlockRecordIterator, error)
returns a copy of the block iterator. This should be called in during time range filtering to avoid PQMR backfilling time filtered records
func (*BlockSearchStatus) GetRecordIteratorForBlock ¶
func (bss *BlockSearchStatus) GetRecordIteratorForBlock(op utils.LogicalOperator) (*BlockRecordIterator, error)
type SegmentSearchStatus ¶
type SegmentSearchStatus struct { AllBlockStatus map[uint16]*BlockSearchStatus // contains filtered or unexported fields }
a helper struct to keep track of which records & blocks need to be searched
func InitBlocksForAggsFastPath ¶
func InitBlocksForAggsFastPath(searchReq *structs.SegmentSearchRequest, blkSum []*structs.BlockSummary) *SegmentSearchStatus
Inits blocks for aggs on input blkSum
func InitBlocksToSearch ¶
func InitBlocksToSearch(searchReq *structs.SegmentSearchRequest, blkSum []*structs.BlockSummary, allSearchResults *segresults.SearchResults, tRange *dtu.TimeRange) *SegmentSearchStatus
Inits blocks & records to search based on input blkSum and tRange. We will generously raw search all records in a block with a HighTS and LowTs inside tRange It is up to the caller to call .Close()
func RawSearchSingleQuery ¶
func RawSearchSingleQuery(query *structs.SearchQuery, searchReq *structs.SegmentSearchRequest, segmentSearch *SegmentSearchStatus, allBlockSearchHelpers []*structs.BlockSearchHelper, op utils.LogicalOperator, queryMetrics *structs.QueryProcessingMetrics, qid uint64, allSearchResults *segresults.SearchResults) *SegmentSearchStatus
Search a single SearchQuery and returns which records passes the filter
func (*SegmentSearchStatus) Close ¶
func (sss *SegmentSearchStatus) Close()
func (*SegmentSearchStatus) GetRecordIteratorForBlock ¶
func (sss *SegmentSearchStatus) GetRecordIteratorForBlock(op utils.LogicalOperator, blkNum uint16) (*BlockRecordIterator, error)
if op == Or return allUnmatchedRecords if op == And return allMatchedRecords if op == Exclusion return allMatchedRecords if this is the first call, then return allMatchedRecords regardless (will be time filtered)