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

Method writeGeoShapeDim

query/time_series_aggregate.go:582–604  ·  view source on GitHub ↗
(geo *geoIntersection,
	outputPredicate devicePointer, dimValueOffset, dimNullOffset int, sizeBeforeGeoFilter, prevResultSize int, stream unsafe.Pointer, device int)

Source from the content-addressed store, hash-verified

580}
581
582func (bc *oopkBatchContext) writeGeoShapeDim(geo *geoIntersection,
583 outputPredicate devicePointer, dimValueOffset, dimNullOffset int, sizeBeforeGeoFilter, prevResultSize int, stream unsafe.Pointer, device int) {
584 if bc.size <= 0 || geo.shapeLatLongs.isNull() {
585 return
586 }
587
588 // geo dimension always take 1 byte and has type uint8
589 // compiler should have checked the number of geo shapes for join is less than 256
590 var dimensionOutputVector C.DimensionOutputVector
591 dimensionVector := bc.dimensionVectorD[0].getPointer()
592 // move dimensionVectorD to the start position of current batch
593 // dimension vector start position + prevResultSize * dataBytes
594 // null vector start position + prevResultSize
595 dimensionOutputVector.DimValues = (*C.uint8_t)(utils.MemAccess(dimensionVector, dimValueOffset+prevResultSize))
596 dimensionOutputVector.DimNulls = (*C.uint8_t)(utils.MemAccess(dimensionVector, dimNullOffset+prevResultSize))
597 dimensionOutputVector.DataType = C.Uint8
598
599 totalWords := (geo.numShapes + 31) / 32
600 doCGoCall(func() C.CGoCallResHandle {
601 return C.WriteGeoShapeDim((C.int)(totalWords), dimensionOutputVector, (C.int)(sizeBeforeGeoFilter),
602 (*C.uint32_t)(outputPredicate.getPointer()), stream, (C.int)(device))
603 })
604}
605
606func (bc *oopkBatchContext) geoIntersect(geo *geoIntersection, pointColumnIndex int,
607 foreignTables []*foreignTable,

Callers 1

evalDimensionsMethod · 0.80

Calls 4

MemAccessFunction · 0.92
isNullMethod · 0.80
getPointerMethod · 0.80
doCGoCallFunction · 0.70

Tested by

no test coverage detected