| 772 | } |
| 773 | |
| 774 | bool deeplake_table_am_routine::scan_getnextslot(TableScanDesc scan, ScanDirection direction, TupleTableSlot* slot) |
| 775 | { |
| 776 | CHECK_FOR_INTERRUPTS(); |
| 777 | |
| 778 | DeeplakeScanData* scan_data = get_scan_data(scan); |
| 779 | |
| 780 | // Reset memory context to prevent unbounded growth |
| 781 | if (scan_data->scan_state.get_current_position() % num_tuples_to_reset_memory_context == 0) { |
| 782 | MemoryContextReset(scan_data->memory_context); |
| 783 | } |
| 784 | |
| 785 | // Switch to the dedicated memory context for this scan |
| 786 | pg::utils::memory_context_switcher context_switcher(scan_data->memory_context); |
| 787 | |
| 788 | if (scan_data->print_progress) [[unlikely]] { |
| 789 | ++scan_data->progress_bar; |
| 790 | } |
| 791 | |
| 792 | return scan_data->scan_state.get_next_tuple(slot); |
| 793 | } |
| 794 | |
| 795 | void deeplake_table_am_routine::scan_set_tidrange(TableScanDesc scan, ItemPointer mintid, ItemPointer maxtid) |
| 796 | { |
nothing calls this directly
no test coverage detected