2017-02-14 16:37:32 +08:00
|
|
|
#include "query_engine_common.hpp"
|
2017-02-15 21:10:16 +08:00
|
|
|
#include "dbms/dbms.hpp"
|
2017-02-14 16:37:32 +08:00
|
|
|
|
|
|
|
using namespace std::chrono_literals;
|
|
|
|
using namespace tests::integration;
|
|
|
|
|
|
|
|
Logger logger;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IMPORTANT: tests only compilation and executability of implemented
|
|
|
|
* hard code queries (not correctnes of implementation)
|
|
|
|
*
|
|
|
|
* NOTE: The correctnes can be tested by custom Stream object.
|
|
|
|
* NOTE: This test will be usefull to test generated query plans.
|
|
|
|
*/
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* init arguments
|
|
|
|
*/
|
|
|
|
REGISTER_ARGS(argc, argv);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* init engine
|
|
|
|
*/
|
|
|
|
auto log = init_logging("IntegrationQueryEngine");
|
2017-02-15 21:10:16 +08:00
|
|
|
Dbms dbms;
|
2017-02-14 16:37:32 +08:00
|
|
|
StreamT stream(std::cout);
|
|
|
|
QueryEngineT query_engine;
|
|
|
|
// IMPORTANT: PrintRecordStream can be replaces with a smarter
|
|
|
|
// object that can test the results
|
2017-02-15 21:10:16 +08:00
|
|
|
|
|
|
|
auto db_accessor = dbms.active();
|
|
|
|
WarmUpEngine(log, query_engine, db_accessor, stream);
|
2017-02-14 16:37:32 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|