MCPcopy Create free account
hub / github.com/activeloopai/deeplake / scan_getnextslot_tidrange

Method scan_getnextslot_tidrange

cpp/deeplake_pg/table_am.cpp:816–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816bool 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
843bool deeplake_table_am_routine::scan_bitmap_next_tuple(

Callers

nothing calls this directly

Calls 3

get_scan_dataFunction · 0.85
get_current_positionMethod · 0.80
get_next_tupleMethod · 0.80

Tested by

no test coverage detected