liveBatchTimeFilterExecutor returns a functor to apply custom time filters to live batch.
(cutoff uint32)
| 533 | |
| 534 | // liveBatchTimeFilterExecutor returns a functor to apply custom time filters to live batch. |
| 535 | func (qc *AQLQueryContext) liveBatchCustomFilterExecutor(cutoff uint32) customFilterExecutor { |
| 536 | return func(stream unsafe.Pointer) { |
| 537 | // cutoff filter evaluation. |
| 538 | // only apply to fact table where cutoff > 0 |
| 539 | if cutoff > 0 { |
| 540 | qc.OOPK.currentBatch.processExpression( |
| 541 | qc.createCutoffTimeFilter(cutoff), nil, |
| 542 | qc.TableScanners, qc.OOPK.foreignTables, stream, qc.Device, qc.OOPK.currentBatch.filterAction) |
| 543 | } |
| 544 | |
| 545 | // time filter evaluation |
| 546 | for _, filter := range qc.OOPK.TimeFilters { |
| 547 | if filter != nil { |
| 548 | qc.OOPK.currentBatch.processExpression(filter, nil, |
| 549 | qc.TableScanners, qc.OOPK.foreignTables, stream, qc.Device, qc.OOPK.currentBatch.filterAction) |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | // prefilter evaluation |
| 554 | for _, filter := range qc.OOPK.Prefilters { |
| 555 | qc.OOPK.currentBatch.processExpression(filter, nil, |
| 556 | qc.TableScanners, qc.OOPK.foreignTables, stream, qc.Device, qc.OOPK.currentBatch.filterAction) |
| 557 | } |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | // transferArchiveBatch returns the functor to transfer an archive batch to device memory. We will need to release |
| 562 | // hostColumns after transfer completes. |
no test coverage detected