Пример #1
0
 value_type operator() () {
   auto d = std::dynamic_pointer_cast<OrderPreservingDictionary<R>>(_dict);
   size_t tabSize = _main->size();
   size_t start = _main->size() - _delta->size();
   for(size_t row = start; row < tabSize; ++row) {
     _main->setValueId(_dstCol, row, ValueId{d->getValueIdForValue(_delta->getValue<R>(_col, row-start)), 0});
   }
 }
Пример #2
0
Store::Store(atable_ptr_t main_table) :
    _delta_size(0),
    _main_table(main_table),
    delta(main_table->copy_structure(create_concurrent_dict, create_concurrent_storage)),
    merger(createDefaultMerger()),
    _cidBeginVector(main_table->size(), 0),
    _cidEndVector(main_table->size(), tx::INF_CID),
    _tidVector(main_table->size(), tx::UNKNOWN) {
  setUuid();
}
Пример #3
0
void RawTable::appendRows(const atable_ptr_t& rows) {
  type_switch<hyrise_basic_types> ts;
  for(size_t row=0; row < rows->size(); ++row) {
    rawtable::RowHelper rh(_metadata);
    for(size_t column=0; column < _metadata.size(); ++column) {
      type_func tf(rows, rh, column, row);
      ts(rows->typeOfColumn(column), tf);
    }
    std::unique_ptr<byte, void (*)(void *)> data(rh.build(), &std::free);
    appendRow(data.get());
  }
}