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

Function hostToDeviceColumn

query/aql_processor.go:1348–1373  ·  view source on GitHub ↗
(hostColumn memCom.HostVectorPartySlice, device int)

Source from the content-addressed store, hash-verified

1346}
1347
1348func hostToDeviceColumn(hostColumn memCom.HostVectorPartySlice, device int) deviceVectorPartySlice {
1349 deviceColumn := deviceVectorPartySlice{
1350 length: hostColumn.Length,
1351 valueType: hostColumn.ValueType,
1352 defaultValue: hostColumn.DefaultValue,
1353 valueStartIndex: hostColumn.ValueStartIndex,
1354 nullStartIndex: hostColumn.NullStartIndex,
1355 countStartIndex: hostColumn.CountStartIndex,
1356 }
1357 totalColumnBytes := hostColumn.ValueBytes + hostColumn.NullBytes + hostColumn.CountBytes
1358
1359 if totalColumnBytes > 0 {
1360 deviceColumn.basePtr = deviceAllocate(totalColumnBytes, device)
1361 if hostColumn.Counts != nil {
1362 deviceColumn.counts = deviceColumn.basePtr.offset(0)
1363 }
1364
1365 if hostColumn.Nulls != nil {
1366 deviceColumn.nulls = deviceColumn.basePtr.offset(hostColumn.CountBytes)
1367 }
1368
1369 deviceColumn.values = deviceColumn.basePtr.offset(
1370 hostColumn.NullBytes + hostColumn.CountBytes)
1371 }
1372 return deviceColumn
1373}
1374
1375// shouldSkipLiveBatch will determine whether we can skip processing a live batch by checking time filter and
1376// eligible main table common filters. The batch must be non nil.

Callers 4

prepareForeignTableMethod · 0.85
transferLiveBatchMethod · 0.85
transferArchiveBatchMethod · 0.85
readDeviceVPSliceFunction · 0.85

Calls 2

deviceAllocateFunction · 0.85
offsetMethod · 0.80

Tested by 1

readDeviceVPSliceFunction · 0.68