예제 #1
0
void AbstractTable::copyValueFrom(const hyrise::storage::c_atable_ptr_t& source, const size_t src_col, const ValueId vid, const size_t dst_col, const size_t dst_row) {
  switch (source->typeOfColumn(src_col)) {
    case IntegerType:
      setValue<hyrise_int_t>(dst_col, dst_row, source->getValueForValueId<hyrise_int_t>(src_col, vid));
      break;

    case FloatType:
      setValue<hyrise_float_t>(dst_col, dst_row, source->getValueForValueId<hyrise_float_t>(src_col, vid));
      break;

    case StringType:
      setValue<hyrise_string_t>(dst_col, dst_row, source->getValueForValueId<hyrise_string_t>(src_col, vid));
      break;

    default:
      break;
  }
}
예제 #2
0
파일: HashTable.cpp 프로젝트: came/hyrise
size_t hash_value(const hyrise::storage::c_atable_ptr_t &source, const size_t &f, const ValueId &vid) {
  hyrise::storage::hash_functor<size_t> fun(source.get(), f, vid);
  hyrise::storage::type_switch<hyrise_basic_types> ts;
  return ts(source->typeOfColumn(f), fun);
}