OmniSciDB  04ee39c94c
anonymous_namespace{UdfTest.cpp} Namespace Reference

Classes

class  SQLTestEnv
 

Functions

std::string udf_file_name_base ("../../Tests/Udf/udf_sample")
 
std::shared_ptr< ResultSetrun_multiple_agg (const std::string &query_str, const ExecutorDeviceType device_type, const bool allow_loop_joins)
 
std::shared_ptr< ResultSetrun_multiple_agg (const std::string &query_str, const ExecutorDeviceType device_type)
 
TargetValue run_simple_agg (const std::string &query_str, const ExecutorDeviceType device_type, const bool allow_loop_joins=true)
 
std::string get_udf_filename ()
 
std::string get_udf_cpu_ir_filename ()
 
std::string get_udf_gpu_ir_filename ()
 
std::string get_udf_ast_filename ()
 
bool skip_tests (const ExecutorDeviceType device_type)
 
void run_ddl_statement (const std::string &query)
 

Variables

std::shared_ptr< Calciteg_calcite = nullptr
 

Function Documentation

◆ get_udf_ast_filename()

std::string anonymous_namespace{UdfTest.cpp}::get_udf_ast_filename ( )

Definition at line 89 of file UdfTest.cpp.

References udf_file_name_base().

Referenced by anonymous_namespace{UdfTest.cpp}::SQLTestEnv::TearDown().

89  {
90  return udf_file_name_base + ".ast";
91 }
std::string udf_file_name_base("../../Tests/Udf/udf_sample")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_udf_cpu_ir_filename()

std::string anonymous_namespace{UdfTest.cpp}::get_udf_cpu_ir_filename ( )

Definition at line 81 of file UdfTest.cpp.

References udf_file_name_base().

Referenced by anonymous_namespace{UdfTest.cpp}::SQLTestEnv::TearDown().

81  {
82  return udf_file_name_base + "_cpu.bc";
83 }
std::string udf_file_name_base("../../Tests/Udf/udf_sample")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_udf_filename()

std::string anonymous_namespace{UdfTest.cpp}::get_udf_filename ( )

Definition at line 77 of file UdfTest.cpp.

References udf_file_name_base().

Referenced by anonymous_namespace{UdfTest.cpp}::SQLTestEnv::SetUp().

77  {
78  return udf_file_name_base + ".cpp";
79 }
std::string udf_file_name_base("../../Tests/Udf/udf_sample")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_udf_gpu_ir_filename()

std::string anonymous_namespace{UdfTest.cpp}::get_udf_gpu_ir_filename ( )

Definition at line 85 of file UdfTest.cpp.

References udf_file_name_base().

Referenced by anonymous_namespace{UdfTest.cpp}::SQLTestEnv::TearDown().

85  {
86  return udf_file_name_base + "_gpu.bc";
87 }
std::string udf_file_name_base("../../Tests/Udf/udf_sample")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run_ddl_statement()

void anonymous_namespace{UdfTest.cpp}::run_ddl_statement ( const std::string &  query)
inline

Definition at line 101 of file UdfTest.cpp.

References QueryRunner::QueryRunner::get(), and QueryRunner::QueryRunner::runDDLStatement().

101  {
103 }
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:

◆ run_multiple_agg() [1/2]

std::shared_ptr<ResultSet> anonymous_namespace{UdfTest.cpp}::run_multiple_agg ( const std::string &  query_str,
const ExecutorDeviceType  device_type,
const bool  allow_loop_joins 
)

Definition at line 57 of file UdfTest.cpp.

References QueryRunner::QueryRunner::get(), and QueryRunner::QueryRunner::runSQL().

59  {
60  return QR::get()->runSQL(query_str, device_type, true, allow_loop_joins);
61 }
virtual std::shared_ptr< ResultSet > runSQL(const std::string &query_str, const ExecutorDeviceType device_type, const bool hoist_literals=true, const bool allow_loop_joins=true)
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:

◆ run_multiple_agg() [2/2]

std::shared_ptr<ResultSet> anonymous_namespace{UdfTest.cpp}::run_multiple_agg ( const std::string &  query_str,
const ExecutorDeviceType  device_type 
)

Definition at line 63 of file UdfTest.cpp.

References run_multiple_agg().

64  {
65  return run_multiple_agg(query_str, device_type, true);
66 }
TQueryResult run_multiple_agg(std::string sql)
+ Here is the call graph for this function:

◆ run_simple_agg()

TargetValue anonymous_namespace{UdfTest.cpp}::run_simple_agg ( const std::string &  query_str,
const ExecutorDeviceType  device_type,
const bool  allow_loop_joins = true 
)

Definition at line 68 of file UdfTest.cpp.

References CHECK_EQ, and run_multiple_agg().

Referenced by TEST_F().

70  {
71  auto rows = run_multiple_agg(query_str, device_type, allow_loop_joins);
72  auto crt_row = rows->getNextRow(true, true);
73  CHECK_EQ(size_t(1), crt_row.size());
74  return crt_row[0];
75 }
#define CHECK_EQ(x, y)
Definition: Logger.h:195
TQueryResult run_multiple_agg(std::string sql)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ skip_tests()

bool anonymous_namespace{UdfTest.cpp}::skip_tests ( const ExecutorDeviceType  device_type)

Definition at line 93 of file UdfTest.cpp.

References QueryRunner::QueryRunner::get(), GPU, and QueryRunner::QueryRunner::gpusPresent().

93  {
94 #ifdef HAVE_CUDA
95  return device_type == ExecutorDeviceType::GPU && !QR::get()->gpusPresent();
96 #else
97  return device_type == ExecutorDeviceType::GPU;
98 #endif
99 }
static QueryRunner * get()
Definition: QueryRunner.h:115
+ Here is the call graph for this function:

◆ udf_file_name_base()

std::string anonymous_namespace{UdfTest.cpp}::udf_file_name_base ( "../../Tests/Udf/udf_sample"  )

Referenced by get_udf_ast_filename(), get_udf_cpu_ir_filename(), get_udf_filename(), and get_udf_gpu_ir_filename().

+ Here is the caller graph for this function:

Variable Documentation

◆ g_calcite

std::shared_ptr<Calcite> anonymous_namespace{UdfTest.cpp}::g_calcite = nullptr

Definition at line 54 of file UdfTest.cpp.

Referenced by TEST_F().