OmniSciDB  343343d194
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{UpdateMetadataTest.cpp} Namespace Reference

Classes

class  TableCycler
 

Functions

void run_ddl_statement (const std::string &create_table_stmt)
 
std::shared_ptr< ResultSetrun_multiple_agg (const std::string &query_str, const ExecutorDeviceType device_type)
 
auto make_table_cycler (char const *table_name, char const *column_type)
 

Variables

bool g_keep_test_data {false}
 
auto query
 
auto get_metadata_vec
 

Function Documentation

auto anonymous_namespace{UpdateMetadataTest.cpp}::make_table_cycler ( char const *  table_name,
char const *  column_type 
)

Definition at line 97 of file UpdateMetadataTest.cpp.

Referenced by TEST_F().

97  {
98  auto drop_if_stmt = "drop table if exists "s + std::string(table_name) + ";"s;
99  auto create_stmt = "create table "s + std::string(table_name) + "( x "s +
100  std::string(column_type) + " );"s;
101  auto drop_stmt = "drop table "s + std::string(table_name) + ";"s;
102 
103  return TableCycler(drop_if_stmt, create_stmt, drop_stmt);
104 }

+ Here is the caller graph for this function:

void anonymous_namespace{UpdateMetadataTest.cpp}::run_ddl_statement ( const std::string &  create_table_stmt)
inline

Definition at line 39 of file UpdateMetadataTest.cpp.

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

39  {
40  QR::get()->runDDLStatement(create_table_stmt);
41 }
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:118

+ Here is the call graph for this function:

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

Definition at line 43 of file UpdateMetadataTest.cpp.

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

44  {
45  return QR::get()->runSQL(query_str, device_type, false, false);
46 }
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:118

+ Here is the call graph for this function:

Variable Documentation

bool anonymous_namespace{UpdateMetadataTest.cpp}::g_keep_test_data {false}

Definition at line 37 of file UpdateMetadataTest.cpp.

auto anonymous_namespace{UpdateMetadataTest.cpp}::get_metadata_vec
Initial value:
=
[](std::string table_name, std::string column_name = "x"s) -> auto {
auto cat = QR::get()->getCatalog();
auto& data_manager = cat->getDataMgr();
auto table_desc = cat->getMetadataForTable(table_name);
auto column_desc = cat->getMetadataForColumn(table_desc->tableId, column_name);
ChunkKey timestamp_ck{
cat->getCurrentDB().dbId, table_desc->tableId, column_desc->columnId};
std::vector<std::pair<ChunkKey, ChunkMetadata>> chunkMetadataVec;
data_manager.getChunkMetadataVecForKeyPrefix(chunkMetadataVec, timestamp_ck);
return chunkMetadataVec;
}
std::vector< int > ChunkKey
Definition: types.h:35
static QueryRunner * get()
Definition: QueryRunner.h:118
std::shared_ptr< Catalog_Namespace::Catalog > getCatalog() const

Definition at line 110 of file UpdateMetadataTest.cpp.

Referenced by TEST_F().

auto anonymous_namespace{UpdateMetadataTest.cpp}::query
Initial value:
= [](std::string query_str) {
}
TQueryResult run_multiple_agg(std::string sql)

Definition at line 106 of file UpdateMetadataTest.cpp.

Referenced by Parser::InsertQueryStmt::analyze(), com.mapd.parser.server.test.TestServer::callCalciteCheck(), org.apache.calcite.sql2rel.SqlToRelConverter::checkConvertedType(), org.apache.calcite.sql2rel.SqlToRelConverter::convertCollectionTable(), org.apache.calcite.sql2rel.SqlToRelConverter::convertCursor(), org.apache.calcite.sql2rel.SqlToRelConverter.Blackboard::convertExpression(), org.apache.calcite.sql2rel.SqlToRelConverter::convertFrom(), org.apache.calcite.sql2rel.SqlToRelConverter::convertQuery(), com.mapd.calcite.parser.MapDParser::desugarExpression(), Parser::InsertValuesStmt::determineLeafIndex(), com.mapd.parser.server.test.TestMapDServer::executeQuery(), com.mapd.metadata.MetaConnect::get_table_detail_SQL(), com.mapd.calcite.parser.MapDParser::getSelectChild(), org.apache.calcite.sql2rel.SqlToRelConverter::isOrdered(), MapDExample.MapDExample::Main(), MapDExample::main(), main(), MapDHandler::parse_to_plan_legacy(), QueryRunner::QueryRunner::parsePlanLegacy(), pg_shim(), anonymous_namespace{CalciteAdapter.cpp}::pg_shim_impl(), anonymous_namespace{PlanTest.cpp}::plan_dml(), Parser::InsertIntoTableAsSelectStmt::LocalConnector::query(), com.mapd.bench.BenchmarkCloud::runQueries(), org.apache.calcite.prepare.SqlIdentifierCapturer::scan(), MapDHandler::sql_execute_impl(), org.apache.calcite.sql2rel.SqlToRelConverter::substituteSubQuery(), TEST(), TEST_F(), Parser::SubqueryExpr::to_string(), Parser::ExistsExpr::to_string(), and anonymous_namespace{ExecuteTest.cpp}::validate_storage_options().