MCPcopy
hub / github.com/uber/aresdb / evalDimensions

Method evalDimensions

query/aql_batchexecutor.go:179–198  ·  view source on GitHub ↗

evalDimensions is to fill dimension values

(prevResultSize int)

Source from the content-addressed store, hash-verified

177
178// evalDimensions is to fill dimension values
179func (e *BatchExecutorImpl) evalDimensions(prevResultSize int) {
180 // dimension expression evaluation.
181 for dimIndex, dimension := range e.qc.OOPK.Dimensions {
182 e.qc.doProfile(func() {
183 dimVectorIndex := e.qc.OOPK.DimensionVectorIndex[dimIndex]
184 dimValueOffset, dimNullOffset := queryCom.GetDimensionStartOffsets(e.qc.OOPK.NumDimsPerDimWidth, dimVectorIndex, e.qc.OOPK.currentBatch.resultCapacity)
185 if e.qc.OOPK.geoIntersection != nil && e.qc.OOPK.geoIntersection.dimIndex == dimIndex {
186 e.qc.OOPK.currentBatch.writeGeoShapeDim(
187 e.qc.OOPK.geoIntersection, e.qc.OOPK.currentBatch.geoPredicateVectorD,
188 dimValueOffset, dimNullOffset, e.sizeBeforeGeoFilter, prevResultSize, e.stream, e.qc.Device)
189 } else {
190 dimensionExprRootAction := e.qc.OOPK.currentBatch.makeWriteToDimensionVectorAction(dimValueOffset, dimNullOffset, prevResultSize)
191 e.qc.OOPK.currentBatch.processExpression(dimension, nil,
192 e.qc.TableScanners, e.qc.OOPK.foreignTables, e.stream, e.qc.Device, dimensionExprRootAction)
193 }
194 }, fmt.Sprintf("dim%d", dimIndex), e.stream)
195 }
196
197 e.qc.reportTimingForCurrentBatch(e.stream, &e.start, dimEvalTiming)
198}
199
200// project is to generate dimension and measure values
201func (e *BatchExecutorImpl) project() {

Callers 2

projectMethod · 0.95
projectMethod · 0.80

Calls 5

doProfileMethod · 0.80
writeGeoShapeDimMethod · 0.80
processExpressionMethod · 0.80

Tested by

no test coverage detected