OmniSciDB  04ee39c94c
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

◆ make_table_cycler()

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:

◆ run_ddl_statement()

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:115
+ Here is the call graph for this function:

◆ run_multiple_agg()

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:115
+ Here is the call graph for this function:

Variable Documentation

◆ g_keep_test_data

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

◆ get_metadata_vec

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::shared_ptr< Catalog_Namespace::Catalog > getCatalog() const
static QueryRunner * get()
Definition: QueryRunner.h:115
std::vector< int > ChunkKey
Definition: types.h:35

Definition at line 110 of file UpdateMetadataTest.cpp.

Referenced by TEST_F().

◆ query

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(), Parser::CaseExpr::CaseExpr(), Parser::CastExpr::CastExpr(), 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(), com.mapd.calcite.parser.MapDParser::desugarExpression(), Parser::InsertValuesStmt::determineLeafIndex(), Parser::InExpr::get_arg(), Parser::CardinalityExpr::get_arg(), Parser::FunctionRef::get_arg(), Parser::CharLengthExpr::get_calc_encoded_length(), Parser::ColumnRef::get_column(), Parser::InsertStmt::get_column_list(), Parser::DoubleLiteral::get_doubleval(), Parser::LikeExpr::get_escape_string(), Parser::RegexpExpr::get_escape_string(), Parser::FixedPtLiteral::get_fixedptval(), Parser::FloatLiteral::get_floatval(), Parser::QuerySpec::get_having_clause(), Parser::IntLiteral::get_intval(), Parser::IsNullExpr::get_is_not(), Parser::LikelihoodExpr::get_likelihood(), Parser::SelectStmt::get_orderby_clause(), Parser::SubqueryExpr::get_query(), Parser::ExistsExpr::get_query(), Parser::InsertQueryStmt::get_query(), Parser::OperExpr::get_right(), Parser::UnionQuery::get_right(), Parser::StringLiteral::get_stringval(), Parser::InSubquery::get_subquery(), com.mapd.metadata.MetaConnect::get_table_detail_SQL(), Parser::BetweenExpr::get_upper(), Parser::ArrayLiteral::get_value_list(), Parser::InValues::get_value_list(), Parser::InsertValuesStmt::get_value_list(), Parser::UpdateStmt::get_where_clause(), Parser::DeleteStmt::get_where_clause(), org.apache.calcite.sql2rel.SqlToRelConverter::isOrdered(), MapDExample.MapDExample::Main(), MapDExample::main(), main(), MapDHandler::max_bytes_for_thrift(), Parser::NullLiteral::NullLiteral(), Planner::Optimizer::optimize(), Planner::Optimizer::optimize_orderby(), Planner::Optimizer::optimize_query(), MapDHandler::parse_to_plan_legacy(), QueryRunner::QueryRunner::parsePlanLegacy(), pg_shim(), anonymous_namespace{CalciteAdapter.cpp}::pg_shim_impl(), anonymous_namespace{PlanTest.cpp}::plan_dml(), Planner::Optimizer::process_targetlist(), 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::TimestampLiteral::TimestampLiteral(), Parser::SubqueryExpr::to_string(), Parser::ExistsExpr::to_string(), Parser::UserLiteral::UserLiteral(), anonymous_namespace{ExecuteTest.cpp}::validate_storage_options(), and Parser::InsertIntoTableAsSelectStmt::LocalConnector::~LocalConnector().