OmniSciDB  2e3a973ef4
foreign_storage::anonymous_namespace{CsvDataWrapper.cpp} Namespace Reference

Functions

std::set< const ColumnDescriptor * > get_columns (const std::map< ChunkKey, AbstractBuffer *> &buffers, std::shared_ptr< Catalog_Namespace::Catalog > catalog, const int32_t table_id, const int fragment_id)
 

Function Documentation

◆ get_columns()

std::set<const ColumnDescriptor*> foreign_storage::anonymous_namespace{CsvDataWrapper.cpp}::get_columns ( const std::map< ChunkKey, AbstractBuffer *> &  buffers,
std::shared_ptr< Catalog_Namespace::Catalog catalog,
const int32_t  table_id,
const int  fragment_id 
)

Definition at line 167 of file CsvDataWrapper.cpp.

References CHECK, CHECK_EQ, CHUNK_KEY_COLUMN_IDX, and CHUNK_KEY_FRAGMENT_IDX.

Referenced by foreign_storage::CsvDataWrapper::populateChunkBuffers().

171  {
172  CHECK(!buffers.empty());
173  std::set<const ColumnDescriptor*> columns;
174  for (const auto& entry : buffers) {
175  CHECK_EQ(fragment_id, entry.first[CHUNK_KEY_FRAGMENT_IDX]);
176  const auto column_id = entry.first[CHUNK_KEY_COLUMN_IDX];
177  const auto column = catalog->getMetadataForColumnUnlocked(table_id, column_id);
178  columns.emplace(column);
179  }
180  return columns;
181 }
#define CHECK_EQ(x, y)
Definition: Logger.h:205
#define CHUNK_KEY_FRAGMENT_IDX
Definition: types.h:42
#define CHUNK_KEY_COLUMN_IDX
Definition: types.h:41
#define CHECK(condition)
Definition: Logger.h:197
+ Here is the caller graph for this function: