OmniSciDB  5ade3759e0
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

◆ get_compression_for_column()

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(), 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:231
const CompressDef * get_compression() const
Definition: ParserNode.h:806
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookup_column() [1/2]

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.

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

◆ lookup_column() [2/2]

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.

Referenced by validate_shared_dictionary().

103  {
104  for (const auto& cd : columns) {
105  if (cd->columnName == name) {
106  return cd;
107  }
108  }
109  return nullptr;
110 }
+ Here is the caller graph for this function: