OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QueryRunner::anonymous_namespace{QueryRunner.cpp} Namespace Reference

Functions

std::shared_ptr< ExecutionResultrun_select_query_with_filter_push_down (QueryStateProxy query_state_proxy, const ExecutorDeviceType device_type, const bool hoist_literals, const bool allow_loop_joins, const bool just_explain, const ExecutorExplainType explain_type, const bool with_filter_push_down)
 

Function Documentation

std::shared_ptr<ExecutionResult> QueryRunner::anonymous_namespace{QueryRunner.cpp}::run_select_query_with_filter_push_down ( QueryStateProxy  query_state_proxy,
const ExecutorDeviceType  device_type,
const bool  hoist_literals,
const bool  allow_loop_joins,
const bool  just_explain,
const ExecutorExplainType  explain_type,
const bool  with_filter_push_down 
)

Definition at line 736 of file QueryRunner.cpp.

References ExecutionOptions::allow_loop_joins, ExecutionOptions::allow_multifrag, ExecutionOptions::allow_runtime_query_interrupt, cat(), CompilationOptions::defaults(), ExecutionOptions::dynamic_watchdog_time_limit, CompilationOptions::explain_type, g_enable_columnar_output, g_gpu_mem_limit_percent, Executor::getExecutor(), query_state::QueryStateProxy::getQueryState(), ExecutionOptions::gpu_input_mem_limit_percent, ExecutionOptions::jit_debug, ExecutionOptions::just_explain, ExecutionOptions::just_validate, LoopStrengthReduction, CompilationOptions::opt_level, ExecutionOptions::output_columnar_hint, ExecutionOptions::pending_query_interrupt_freq, pg_shim(), run_benchmark_import::result, ExecutionOptions::running_query_interrupt_freq, Executor::UNITARY_EXECUTOR_ID, ExecutionOptions::with_dynamic_watchdog, and ExecutionOptions::with_watchdog.

Referenced by QueryRunner::QueryRunner::runSelectQuery().

743  {
744  auto const& query_state = query_state_proxy.getQueryState();
745  const auto& cat = query_state.getConstSessionInfo()->getCatalog();
749  co.explain_type = explain_type;
750 
752  true,
753  just_explain,
754  allow_loop_joins,
755  false,
756  false,
757  false,
758  false,
759  10000,
760  with_filter_push_down,
761  false,
763  false};
764  auto calcite_mgr = cat.getCalciteMgr();
765  const auto query_ra = calcite_mgr
766  ->process(query_state_proxy,
767  pg_shim(query_state.getQueryStr()),
768  {},
769  true,
770  false,
771  false,
772  true)
773  .plan_result;
774  auto ra_executor = RelAlgExecutor(executor.get(), cat, query_ra);
775  auto result = std::make_shared<ExecutionResult>(
776  ra_executor.executeRelAlgQuery(co, eo, false, nullptr));
777  const auto& filter_push_down_requests = result->getPushedDownFilterInfo();
778  if (!filter_push_down_requests.empty()) {
779  std::vector<TFilterPushDownInfo> filter_push_down_info;
780  for (const auto& req : filter_push_down_requests) {
781  TFilterPushDownInfo filter_push_down_info_for_request;
782  filter_push_down_info_for_request.input_prev = req.input_prev;
783  filter_push_down_info_for_request.input_start = req.input_start;
784  filter_push_down_info_for_request.input_next = req.input_next;
785  filter_push_down_info.push_back(filter_push_down_info_for_request);
786  }
787  const auto new_query_ra = calcite_mgr
788  ->process(query_state_proxy,
789  pg_shim(query_state.getQueryStr()),
790  filter_push_down_info,
791  true,
792  false,
793  false,
794  true)
795  .plan_result;
796  const ExecutionOptions eo_modified{eo.output_columnar_hint,
797  eo.allow_multifrag,
798  eo.just_explain,
799  eo.allow_loop_joins,
800  eo.with_watchdog,
801  eo.jit_debug,
802  eo.just_validate,
805  /*find_push_down_candidates=*/false,
806  /*just_calcite_explain=*/false,
811  auto new_ra_executor = RelAlgExecutor(executor.get(), cat, new_query_ra);
812  return std::make_shared<ExecutionResult>(
813  new_ra_executor.executeRelAlgQuery(co, eo_modified, false, nullptr));
814  } else {
815  return result;
816  }
817 }
std::string cat(Ts &&...args)
ExecutorOptLevel opt_level
double running_query_interrupt_freq
static std::shared_ptr< Executor > getExecutor(const ExecutorId id, const std::string &debug_dir="", const std::string &debug_file="", const SystemParameters &system_parameters=SystemParameters())
Definition: Execute.cpp:176
bool g_enable_columnar_output
Definition: Execute.cpp:95
QueryState & getQueryState()
Definition: QueryState.h:181
ExecutorExplainType explain_type
double g_gpu_mem_limit_percent
Definition: QueryRunner.cpp:52
unsigned pending_query_interrupt_freq
static CompilationOptions defaults(const ExecutorDeviceType device_type=ExecutorDeviceType::GPU)
double gpu_input_mem_limit_percent
unsigned dynamic_watchdog_time_limit
std::string pg_shim(const std::string &query)
static const ExecutorId UNITARY_EXECUTOR_ID
Definition: Execute.h:384

+ Here is the call graph for this function:

+ Here is the caller graph for this function: