示例#1
0
  void SetUp() {

    hyrise::tx::TransactionManager::getInstance().reset();

    TableBuilder::param_list list;
    list.append().set_type("INTEGER").set_name("a");
    list.append().set_type("FLOAT").set_name("b");
    list.append().set_type("STRING").set_name("c");

    list.appendGroup(1).appendGroup(1).appendGroup(1);

    TableBuilder::param_list list2;
    list2.append().set_type("INTEGER").set_name("col_0");
    list2.append().set_type("INTEGER").set_name("col_1");

    one_row = TableBuilder::build(list2);
    one_row->resize(1);
    one_row->setValue<hyrise_int_t>(0, 0, 99);
    one_row->setValue<hyrise_int_t>(1, 0, 999);

    second_row = TableBuilder::build(list2);
    second_row->resize(1);
    second_row->setValue<hyrise_int_t>(0, 0, 22);
    second_row->setValue<hyrise_int_t>(1, 0, 222);

    // Convert to store
    data = std::make_shared<storage::Store>(storage::TableBuilder::build(list));
    linxxxs = std::dynamic_pointer_cast<storage::Store>(io::Loader::shortcuts::load("test/lin_xxxs.tbl"));
    linxxxs_ref = std::dynamic_pointer_cast<storage::Store>(io::Loader::shortcuts::load("test/lin_xxxs.tbl"));
  }
示例#2
0
  void BenchmarkSetUp() {
    auto& txmgr = tx::TransactionManager::getInstance();
    txmgr.reset();
    storage::TableBuilder::param_list list2;
    list2.append().set_type("INTEGER").set_name("col_0");
    list2.append().set_type("INTEGER").set_name("col_1");

    one_row = storage::TableBuilder::build(list2);
    one_row->resize(1);
    one_row->setValue<hyrise_int_t>(0,0, 99);
    one_row->setValue<hyrise_int_t>(1,0, 999);

    linxxxs = checked_pointer_cast<storage::Store>(io::Loader::shortcuts::load("test/lin_xxxs.tbl"));
  }