OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColumnIR.cpp File Reference
#include "CodeGenerator.h"
#include "Codec.h"
#include "CodegenHelper.h"
#include "Execute.h"
#include "WindowContext.h"
+ Include dependency graph for ColumnIR.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{ColumnIR.cpp}
 

Functions

std::shared_ptr< Decoderanonymous_namespace{ColumnIR.cpp}::get_col_decoder (const Analyzer::ColumnVar *col_var)
 
size_t anonymous_namespace{ColumnIR.cpp}::get_col_bit_width (const Analyzer::ColumnVar *col_var)
 
int anonymous_namespace{ColumnIR.cpp}::adjusted_range_table_index (const Analyzer::ColumnVar *col_var)
 
SQLTypes anonymous_namespace{ColumnIR.cpp}::get_phys_int_type (const size_t byte_sz)
 
const Analyzer::Exprremove_cast_to_int (const Analyzer::Expr *expr)
 

Function Documentation

const Analyzer::Expr* remove_cast_to_int ( const Analyzer::Expr expr)

Definition at line 618 of file ColumnIR.cpp.

References Analyzer::Expr::get_type_info(), and kCAST.

Referenced by anonymous_namespace{DateTimePlusRewrite.cpp}::get_dt_field(), CodeGenerator::hashJoinLhs(), and CodeGenerator::needCastForHashJoinLhs().

618  {
619  const auto uoper = dynamic_cast<const Analyzer::UOper*>(expr);
620  if (!uoper || uoper->get_optype() != kCAST) {
621  return nullptr;
622  }
623  const auto& target_ti = uoper->get_type_info();
624  if (!target_ti.is_integer()) {
625  return nullptr;
626  }
627  return uoper->get_operand();
628 }
Definition: sqldefs.h:51
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:79

+ Here is the call graph for this function:

+ Here is the caller graph for this function: