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

Method scan_set_tidrange

cpp/deeplake_pg/table_am.cpp:795–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793}
794
795void deeplake_table_am_routine::scan_set_tidrange(TableScanDesc scan, ItemPointer mintid, ItemPointer maxtid)
796{
797 CHECK_FOR_INTERRUPTS();
798
799 DeeplakeScanData* scan_data = get_scan_data(scan);
800 scan_data->min_tid = utils::tid_to_row_number(mintid);
801 scan_data->max_tid = utils::tid_to_row_number(maxtid);
802 scan_data->current_tid = utils::tid_to_row_number(mintid);
803
804 if (scan_data->min_tid > scan_data->max_tid || scan_data->current_tid > scan_data->max_tid ||
805 scan_data->current_tid < scan_data->min_tid) {
806 return;
807 }
808
809 scan_data->tid_range_scan_active = true;
810
811 // Reset the scan state to start from the beginning of the range
812 scan_data->scan_state.set_current_position(scan_data->current_tid);
813 MemoryContextReset(scan_data->memory_context);
814}
815
816bool deeplake_table_am_routine::scan_getnextslot_tidrange(TableScanDesc scan,
817 ScanDirection direction,

Callers

nothing calls this directly

Calls 3

get_scan_dataFunction · 0.85
tid_to_row_numberFunction · 0.85
set_current_positionMethod · 0.80

Tested by

no test coverage detected