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

Method scan_rescan

cpp/deeplake_pg/table_am.cpp:744–765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742}
743
744void deeplake_table_am_routine::scan_rescan(TableScanDesc scan,
745 struct ScanKeyData* key,
746 bool set_params,
747 bool allow_strat,
748 bool allow_sync,
749 bool allow_pagemode)
750{
751 DeeplakeScanData* scan_data = get_scan_data(scan);
752 if (scan_data) {
753 scan_data->scan_state.set_current_position(0);
754 MemoryContextReset(scan_data->memory_context);
755 scan_data->reset();
756 if (scan_data->print_progress) [[unlikely]] {
757 ++scan_data->num_rescans;
758 std::string pre_msg = "Progress of sequential scan for table '" +
759 scan_data->scan_state.get_table_data().get_table_name() + "'" + " (rescan " +
760 std::to_string(scan_data->num_rescans) + ")";
761 scan_data->progress_bar.restart(scan_data->scan_state.get_table_data().num_total_rows(),
762 std::move(pre_msg));
763 }
764 }
765}
766
767void deeplake_table_am_routine::scan_end(TableScanDesc scan)
768{

Callers

nothing calls this directly

Calls 6

get_scan_dataFunction · 0.85
to_stringFunction · 0.85
set_current_positionMethod · 0.80
restartMethod · 0.80
num_total_rowsMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected