OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{SharedDictionaryValidator.cpp} Namespace Reference

Functions

const ColumnDescriptorlookup_column (const std::string &name, const std::list< ColumnDescriptor > &columns)
 
const ColumnDescriptorlookup_column (const std::string &name, const std::list< const ColumnDescriptor * > &columns)
 
const Parser::CompressDefget_compression_for_column (const std::string &name, const std::list< std::unique_ptr< Parser::TableElement >> &table_element_list)
 

Function Documentation

const Parser::CompressDef* anonymous_namespace{SharedDictionaryValidator.cpp}::get_compression_for_column ( const std::string &  name,
const std::list< std::unique_ptr< Parser::TableElement >> &  table_element_list 
)

Definition at line 112 of file SharedDictionaryValidator.cpp.

References Parser::ColumnDef::get_compression(), setup::name, and UNREACHABLE.

Referenced by validate_shared_dictionary().

114  {
115  for (const auto& e : table_element_list) {
116  const auto col_def = dynamic_cast<Parser::ColumnDef*>(e.get());
117  if (!col_def || *col_def->get_column_name() != name) {
118  continue;
119  }
120  return col_def->get_compression();
121  }
122  UNREACHABLE();
123  return nullptr;
124 }
#define UNREACHABLE()
Definition: Logger.h:338
const CompressDef * get_compression() const
Definition: ParserNode.h:829
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const ColumnDescriptor* anonymous_namespace{SharedDictionaryValidator.cpp}::lookup_column ( const std::string &  name,
const std::list< ColumnDescriptor > &  columns 
)

Definition at line 92 of file SharedDictionaryValidator.cpp.

Referenced by validate_shared_dictionary().

93  {
94  for (const auto& cd : columns) {
95  if (cd.columnName == name) {
96  return &cd;
97  }
98  }
99  return nullptr;
100 }
string name
Definition: setup.in.py:72

+ Here is the caller graph for this function:

const ColumnDescriptor* anonymous_namespace{SharedDictionaryValidator.cpp}::lookup_column ( const std::string &  name,
const std::list< const ColumnDescriptor * > &  columns 
)

Definition at line 102 of file SharedDictionaryValidator.cpp.

103  {
104  for (const auto& cd : columns) {
105  if (cd->columnName == name) {
106  return cd;
107  }
108  }
109  return nullptr;
110 }
string name
Definition: setup.in.py:72