| 814 | } |
| 815 | |
| 816 | bool deeplake_table_am_routine::scan_getnextslot_tidrange(TableScanDesc scan, |
| 817 | ScanDirection direction, |
| 818 | TupleTableSlot* slot) |
| 819 | { |
| 820 | CHECK_FOR_INTERRUPTS(); |
| 821 | |
| 822 | DeeplakeScanData* scan_data = get_scan_data(scan); |
| 823 | if (!scan_data || !scan_data->tid_range_scan_active) { |
| 824 | return false; |
| 825 | } |
| 826 | |
| 827 | const auto current = scan_data->scan_state.get_current_position(); |
| 828 | if (current > scan_data->max_tid || current < scan_data->min_tid) { |
| 829 | return false; |
| 830 | } |
| 831 | |
| 832 | if (current % num_tuples_to_reset_memory_context == 0) { |
| 833 | MemoryContextReset(scan_data->memory_context); |
| 834 | } |
| 835 | |
| 836 | // Switch to the dedicated memory context for this scan |
| 837 | pg::utils::memory_context_switcher context_switcher(scan_data->memory_context); |
| 838 | |
| 839 | return scan_data->scan_state.get_next_tuple(slot); |
| 840 | } |
| 841 | |
| 842 | #if PG_VERSION_NUM >= PG_VERSION_NUM_18 |
| 843 | bool deeplake_table_am_routine::scan_bitmap_next_tuple( |
nothing calls this directly
no test coverage detected