Exemplo n.º 1
0
 virtual void SetUp() {
   AccessTest::SetUp();
   t = io::Loader::shortcuts::load("test/index_test.tbl");
   CreateIndex ci;
   ci.addInput(t);
   ci.addField(0);
   ci.setIndexName("my_index");
   ci.execute();
 }
Exemplo n.º 2
0
TEST_F(CreateIndexTests, basic_create_index_test) {
  StorageManager *sm = StorageManager::getInstance();
  std::string table = "test_table1";
  std::shared_ptr<AbstractTable> t = Loader::shortcuts::load("test/index_test.tbl");

  CreateIndex i;
  i.addInput(t);
  i.addField(0);
  i.setIndexName(table);
  i.execute();

  std::shared_ptr<InvertedIndex<hyrise_int_t>> index = std::dynamic_pointer_cast<InvertedIndex<hyrise_int_t>> (sm->getInvertedIndex(table));

  ASSERT_NE(index.get(), (InvertedIndex<storage::hyrise_int_t> *) nullptr);
}