AQLQueryContext stores all contextual data for handling an AQL query.
| 346 | |
| 347 | // AQLQueryContext stores all contextual data for handling an AQL query. |
| 348 | type AQLQueryContext struct { |
| 349 | // The query input. |
| 350 | Query *queryCom.AQLQuery `json:"query"` |
| 351 | |
| 352 | // Context for one-operator-per-kernel execution. |
| 353 | OOPK OOPKContext `json:"oopk"` |
| 354 | |
| 355 | //// Compiled time series aggregate query structure. |
| 356 | //// TODO: TSAggregate is only used for VM based query engine. |
| 357 | //TSAggregate C.TimeSeriesAggregate `json:"-"` |
| 358 | |
| 359 | // Scanner for all tables. [0] for the main table; [1:] for tables in joins. |
| 360 | TableScanners []*TableScanner `json:"scanners"` |
| 361 | // Map from table alias to ID (index to TableScanners). |
| 362 | TableIDByAlias map[string]int `json:"tableIDs"` |
| 363 | // Map from table name to schema for convenience. In case of self join, |
| 364 | // only one entry is referenced here by the name of the table. |
| 365 | TableSchemaByName map[string]*memCom.TableSchema `json:"-"` |
| 366 | // Index to filters in Query.Filters that are identified as prefilters. |
| 367 | Prefilters []int `json:"prefilters,omitempty"` |
| 368 | |
| 369 | Error error `json:"error,omitempty"` |
| 370 | |
| 371 | Device int `json:"device"` |
| 372 | |
| 373 | Debug bool `json:"debug,omitempty"` |
| 374 | |
| 375 | Profiling string `json:"profiling,omitempty"` |
| 376 | |
| 377 | // We alternate with two Cuda streams between batches for pipelining. |
| 378 | // [0] stores the current stream, and [1] stores the other stream. |
| 379 | cudaStreams [2]unsafe.Pointer |
| 380 | |
| 381 | Results queryCom.AQLQueryResult `json:"-"` |
| 382 | resultFlushContext resultFlushContext |
| 383 | |
| 384 | // whether it's a DataOnly request from broker |
| 385 | DataOnly bool `json:"DataOnly"` |
| 386 | // whether to serialize the query result as HLLData. If ReturnHLLData is true, we will not release dimension |
| 387 | // vector and measure vector until serialization is done. |
| 388 | ReturnHLLData bool `json:"ReturnHLLData"` |
| 389 | HLLQueryResult []byte `json:"-"` |
| 390 | |
| 391 | // for time filter |
| 392 | fixedTimezone *time.Location |
| 393 | fromTime *queryCom.AlignedTime |
| 394 | toTime *queryCom.AlignedTime |
| 395 | dstswitch int64 |
| 396 | |
| 397 | // timezone column and time filter related |
| 398 | timezoneTable timezoneTableContext |
| 399 | |
| 400 | // fields for non aggregate query |
| 401 | // Flag to indicate if this query is not aggregation query |
| 402 | IsNonAggregationQuery bool |
| 403 | numberOfRowsWritten int |
| 404 | maxBatchSizeAfterPrefilter int |
| 405 |
nothing calls this directly
no outgoing calls
no test coverage detected