OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExternalExecutor.h File Reference
#include <string>
#include <vector>
#include "QueryEngine/ColumnFetcher.h"
#include "QueryEngine/PlanState.h"
#include "QueryEngine/SerializeToSql.h"
#include "QueryEngine/TargetMetaInfo.h"
#include "ThirdParty/sqlite3/sqlite3.h"
+ Include dependency graph for ExternalExecutor.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  ExternalQueryTable
struct  ExternalQueryOutputSpec
class  NativeExecutionError
class  SqliteMemDatabase


std::unique_ptr< ResultSetrun_query_external (const ExecutionUnitSql &sql, const FetchResult &fetch_result, const PlanState *plan_state, const ExternalQueryOutputSpec &output_spec)
bool is_supported_type_for_extern_execution (const SQLTypeInfo &ti)

Function Documentation

bool is_supported_type_for_extern_execution ( const SQLTypeInfo ti)

Definition at line 529 of file ExternalExecutor.cpp.

References SQLTypeInfo::is_fp(), SQLTypeInfo::is_integer(), and SQLTypeInfo::is_string().

Referenced by anonymous_namespace{ExternalExecutor.cpp}::create_table_schema(), and ScalarExprToSql::visitUOper().

529  {
530  return ti.is_integer() || ti.is_fp() || ti.is_string();
531 }
bool is_fp() const
Definition: sqltypes.h:513
bool is_integer() const
Definition: sqltypes.h:511
bool is_string() const
Definition: sqltypes.h:509

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::unique_ptr<ResultSet> run_query_external ( const ExecutionUnitSql sql,
const FetchResult fetch_result,
const PlanState plan_state,
const ExternalQueryOutputSpec output_spec 

Definition at line 514 of file ExternalExecutor.cpp.

References bench_batch_streaming_ingest::create_table(), anonymous_namespace{ExternalExecutor.cpp}::create_table_schema(), ExternalQueryOutputSpec::executor, ExecutionUnitSql::from_table, ExecutionUnitSql::query, SqliteMemDatabase::run(), and SqliteMemDatabase::runSelect().

Referenced by ExecutionKernel::runImpl().

518  {
519  ExternalQueryTable external_query_table{fetch_result,
520  create_table_schema(plan_state),
521  sql.from_table,
522  output_spec.executor};
523  SqliteMemDatabase db(external_query_table);
524  const auto create_table = "create virtual table " + sql.from_table + " using omnisci";
526  return db.runSelect(sql.query, output_spec);
527 }
const Executor * executor
std::vector< TargetMetaInfo > create_table_schema(const PlanState *plan_state)
std::string from_table
std::string query

+ Here is the call graph for this function:

+ Here is the caller graph for this function: