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

Method scan_getnextslot

cpp/deeplake_pg/table_am.cpp:774–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

772}
773
774bool 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
795void deeplake_table_am_routine::scan_set_tidrange(TableScanDesc scan, ItemPointer mintid, ItemPointer maxtid)
796{

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