OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Analyzer.cpp File Reference

Analyzer functions. More...

#include "Analyzer.h"
#include "../Catalog/Catalog.h"
#include "../QueryEngine/DateTimeUtils.h"
#include "../Shared/DateConverters.h"
#include "../Shared/sql_type_to_string.h"
#include "../Shared/sql_window_function_to_string.h"
#include "../Shared/sqltypes.h"
#include "RangeTableEntry.h"
#include <algorithm>
#include <cstring>
#include <iostream>
#include <stdexcept>
+ Include dependency graph for Analyzer.cpp:

Go to the source code of this file.

Classes

struct  Analyzer::anonymous_namespace{Analyzer.cpp}::IntFracRepr
 

Namespaces

 Analyzer
 
 Analyzer::anonymous_namespace{Analyzer.cpp}
 

Functions

IntFracRepr Analyzer::anonymous_namespace{Analyzer.cpp}::decimal_to_int_frac (const int64_t dec, const SQLTypeInfo &ti)
 
template<class T >
Analyzer::anonymous_namespace{Analyzer.cpp}::safe_narrow (const int64_t v)
 
template<class T >
bool Analyzer::anonymous_namespace{Analyzer.cpp}::expr_is (const std::shared_ptr< Analyzer::Expr > &expr)
 
bool Analyzer::anonymous_namespace{Analyzer.cpp}::is_expr_nullable (const Analyzer::Expr *expr)
 
bool Analyzer::anonymous_namespace{Analyzer.cpp}::is_in_values_nullable (const std::shared_ptr< Analyzer::Expr > &a, const std::list< std::shared_ptr< Analyzer::Expr >> &l)
 
bool Analyzer::Datum_equal (const SQLTypeInfo &ti, Datum val1, Datum val2)
 
bool expr_list_match (const std::vector< std::shared_ptr< Analyzer::Expr >> &lhs, const std::vector< std::shared_ptr< Analyzer::Expr >> &rhs)
 
std::shared_ptr< Analyzer::Exprremove_cast (const std::shared_ptr< Analyzer::Expr > &expr)
 

Detailed Description

Analyzer functions.

Author
Wei Hong wei@m.nosp@m.ap-d.nosp@m..com Copyright (c) 2014 MapD Technologies, Inc. All rights reserved.

Definition in file Analyzer.cpp.

Function Documentation

bool expr_list_match ( const std::vector< std::shared_ptr< Analyzer::Expr >> &  lhs,
const std::vector< std::shared_ptr< Analyzer::Expr >> &  rhs 
)

Definition at line 3043 of file Analyzer.cpp.

Referenced by Analyzer::ExpressionTuple::operator==(), Analyzer::WindowFunction::operator==(), Analyzer::GeoExpr::operator==(), rewrite_avg_window(), and anonymous_namespace{WindowExpressionRewrite.cpp}::window_sum_and_count_match().

3044  {
3045  if (lhs.size() != rhs.size()) {
3046  return false;
3047  }
3048  for (size_t i = 0; i < lhs.size(); ++i) {
3049  if (!(*lhs[i] == *rhs[i])) {
3050  return false;
3051  }
3052  }
3053  return true;
3054 }

+ Here is the caller graph for this function:

std::shared_ptr<Analyzer::Expr> remove_cast ( const std::shared_ptr< Analyzer::Expr > &  expr)

Definition at line 3056 of file Analyzer.cpp.

References Analyzer::UOper::get_own_operand(), and kCAST.

Referenced by anonymous_namespace{EquiJoinCondition.cpp}::can_combine_with(), anonymous_namespace{EquiJoinCondition.cpp}::make_composite_equals_impl(), and rewrite_sum_window().

3056  {
3057  const auto uoper = dynamic_cast<const Analyzer::UOper*>(expr.get());
3058  if (!uoper || uoper->get_optype() != kCAST) {
3059  return expr;
3060  }
3061  return uoper->get_own_operand();
3062 }
const std::shared_ptr< Analyzer::Expr > get_own_operand() const
Definition: Analyzer.h:366
Definition: sqldefs.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function: