OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DefaultIOFacet< FRAGMENTER_TYPE > Class Template Reference

#include <StorageIOFacility.h>

Public Types

using FragmenterType = FRAGMENTER_TYPE
 
using DeleteVictimOffsetList = std::vector< uint64_t >
 
using UpdateTargetOffsetList = std::vector< uint64_t >
 
using UpdateTargetTypeList = std::vector< TargetMetaInfo >
 
using UpdateTargetColumnNamesList = std::vector< std::string >
 
using TransactionLog = typename FragmenterType::ModifyTransactionTracker
 
using TransactionLogPtr = std::unique_ptr< TransactionLog >
 
using ColumnValidationFunction = std::function< bool(std::string const &)>
 

Static Public Member Functions

template<typename CATALOG_TYPE , typename TABLE_ID_TYPE , typename COLUMN_NAME_TYPE , typename FRAGMENT_ID_TYPE , typename FRAGMENT_OFFSET_LIST_TYPE , typename UPDATE_VALUES_LIST_TYPE , typename COLUMN_TYPE_INFO >
static void updateColumn (CATALOG_TYPE const &cat, TABLE_ID_TYPE const &&table_id, COLUMN_NAME_TYPE const &column_name, FRAGMENT_ID_TYPE const frag_id, FRAGMENT_OFFSET_LIST_TYPE const &frag_offsets, UPDATE_VALUES_LIST_TYPE const &update_values, COLUMN_TYPE_INFO const &col_type_info, TransactionLog &transaction_tracker)
 
template<typename CATALOG_TYPE , typename TABLE_ID_TYPE , typename FRAGMENT_ID_TYPE , typename VICTIM_OFFSET_LIST , typename COLUMN_TYPE_INFO >
static void deleteColumns (CATALOG_TYPE const &cat, TABLE_ID_TYPE const &&table_id, FRAGMENT_ID_TYPE const frag_id, VICTIM_OFFSET_LIST &victims, COLUMN_TYPE_INFO const &col_type_info, TransactionLog &transaction_tracker)
 
template<typename CATALOG_TYPE , typename TABLE_DESCRIPTOR_TYPE >
static std::function< bool(std::string
const &)> 
yieldColumnValidator (CATALOG_TYPE const &cat, TABLE_DESCRIPTOR_TYPE const *table_descriptor)
 

Detailed Description

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
class DefaultIOFacet< FRAGMENTER_TYPE >

Definition at line 18 of file StorageIOFacility.h.

Member Typedef Documentation

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::ColumnValidationFunction = std::function<bool(std::string const&)>

Definition at line 27 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::DeleteVictimOffsetList = std::vector<uint64_t>

Definition at line 21 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::FragmenterType = FRAGMENTER_TYPE

Definition at line 20 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::TransactionLog = typename FragmenterType::ModifyTransactionTracker

Definition at line 25 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::TransactionLogPtr = std::unique_ptr<TransactionLog>

Definition at line 26 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::UpdateTargetColumnNamesList = std::vector<std::string>

Definition at line 24 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::UpdateTargetOffsetList = std::vector<uint64_t>

Definition at line 22 of file StorageIOFacility.h.

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
using DefaultIOFacet< FRAGMENTER_TYPE >::UpdateTargetTypeList = std::vector<TargetMetaInfo>

Definition at line 23 of file StorageIOFacility.h.

Member Function Documentation

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
template<typename CATALOG_TYPE , typename TABLE_ID_TYPE , typename FRAGMENT_ID_TYPE , typename VICTIM_OFFSET_LIST , typename COLUMN_TYPE_INFO >
static void DefaultIOFacet< FRAGMENTER_TYPE >::deleteColumns ( CATALOG_TYPE const &  cat,
TABLE_ID_TYPE const &&  table_id,
FRAGMENT_ID_TYPE const  frag_id,
VICTIM_OFFSET_LIST &  victims,
COLUMN_TYPE_INFO const &  col_type_info,
TransactionLog transaction_tracker 
)
inlinestatic

Definition at line 65 of file StorageIOFacility.h.

References CHECK(), Data_Namespace::CPU_LEVEL, logger::INFO, and LOG.

70  {
71  auto const* table_descriptor = cat.getMetadataForTable(table_id);
72  auto* fragmenter = table_descriptor->fragmenter;
73  CHECK(fragmenter);
74 
75  auto const* deleted_column_desc = cat.getDeletedColumn(table_descriptor);
76  if (deleted_column_desc != nullptr) {
77  fragmenter->updateColumn(&cat,
78  table_descriptor,
79  deleted_column_desc,
80  frag_id,
81  victims,
82  ScalarTargetValue(int64_t(1L)),
83  col_type_info,
85  transaction_tracker);
86  } else {
87  LOG(INFO) << "Delete metadata column unavailable; skipping delete operation.";
88  }
89  }
#define LOG(tag)
Definition: Logger.h:185
CHECK(cgen_state)
boost::variant< int64_t, double, float, NullableString > ScalarTargetValue
Definition: TargetValue.h:156

+ Here is the call graph for this function:

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
template<typename CATALOG_TYPE , typename TABLE_ID_TYPE , typename COLUMN_NAME_TYPE , typename FRAGMENT_ID_TYPE , typename FRAGMENT_OFFSET_LIST_TYPE , typename UPDATE_VALUES_LIST_TYPE , typename COLUMN_TYPE_INFO >
static void DefaultIOFacet< FRAGMENTER_TYPE >::updateColumn ( CATALOG_TYPE const &  cat,
TABLE_ID_TYPE const &&  table_id,
COLUMN_NAME_TYPE const &  column_name,
FRAGMENT_ID_TYPE const  frag_id,
FRAGMENT_OFFSET_LIST_TYPE const &  frag_offsets,
UPDATE_VALUES_LIST_TYPE const &  update_values,
COLUMN_TYPE_INFO const &  col_type_info,
TransactionLog transaction_tracker 
)
inlinestatic

Definition at line 36 of file StorageIOFacility.h.

References CHECK(), and Data_Namespace::CPU_LEVEL.

43  {
44  auto const* table_descriptor = cat.getMetadataForTable(table_id);
45  auto* fragmenter = table_descriptor->fragmenter;
46  CHECK(fragmenter);
47  auto const* target_column = cat.getMetadataForColumn(table_id, column_name);
48 
49  fragmenter->updateColumn(&cat,
50  table_descriptor,
51  target_column,
52  frag_id,
53  frag_offsets,
54  update_values,
55  col_type_info,
57  transaction_tracker);
58  }
CHECK(cgen_state)

+ Here is the call graph for this function:

template<typename FRAGMENTER_TYPE = Fragmenter_Namespace::InsertOrderFragmenter>
template<typename CATALOG_TYPE , typename TABLE_DESCRIPTOR_TYPE >
static std::function<bool(std::string const&)> DefaultIOFacet< FRAGMENTER_TYPE >::yieldColumnValidator ( CATALOG_TYPE const &  cat,
TABLE_DESCRIPTOR_TYPE const *  table_descriptor 
)
inlinestatic

Definition at line 92 of file StorageIOFacility.h.

94  {
95  return [](std::string const& column_name) -> bool { return true; };
96  };

The documentation for this class was generated from the following file: