OmniSciDB
cde582ebc3
|
#include "QueryEngine/ExpressionRewrite.h"
#include <algorithm>
#include <boost/locale/conversion.hpp>
#include <unordered_set>
#include "Analyzer/Analyzer.h"
#include "Logger/Logger.h"
#include "Parser/ParserNode.h"
#include "QueryEngine/DeepCopyVisitor.h"
#include "QueryEngine/Execute.h"
#include "QueryEngine/RelAlgTranslator.h"
#include "QueryEngine/ScalarExprVisitor.h"
#include "QueryEngine/WindowExpressionRewrite.h"
#include "Shared/sqldefs.h"
#include "StringOps/StringOps.h"
Go to the source code of this file.
Namespaces | |
anonymous_namespace{ExpressionRewrite.cpp} | |
Functions | |
const Analyzer::Expr * | anonymous_namespace{ExpressionRewrite.cpp}::strip_likelihood (const Analyzer::Expr *expr) |
Analyzer::ExpressionPtr | rewrite_array_elements (Analyzer::Expr const *expr) |
Analyzer::ExpressionPtr | rewrite_expr (const Analyzer::Expr *expr) |
boost::optional < OverlapsJoinConjunction > | rewrite_overlaps_conjunction (const std::shared_ptr< Analyzer::Expr > expr) |
std::list< std::shared_ptr < Analyzer::Expr > > | strip_join_covered_filter_quals (const std::list< std::shared_ptr< Analyzer::Expr >> &quals, const JoinQualsPerNestingLevel &join_quals) |
std::shared_ptr< Analyzer::Expr > | fold_expr (const Analyzer::Expr *expr) |
bool | self_join_not_covered_by_left_deep_tree (const Analyzer::ColumnVar *key_side, const Analyzer::ColumnVar *val_side, const int max_rte_covered) |
const int | get_max_rte_scan_table (std::unordered_map< int, llvm::Value * > &scan_idx_to_hash_pos) |
Variables | |
static const std::unordered_set < std::string > | anonymous_namespace{ExpressionRewrite.cpp}::overlaps_supported_functions |
static const std::unordered_set < std::string > | anonymous_namespace{ExpressionRewrite.cpp}::requires_many_to_many |
std::shared_ptr<Analyzer::Expr> fold_expr | ( | const Analyzer::Expr * | expr | ) |
Definition at line 1052 of file ExpressionRewrite.cpp.
References kBIGINT, and anonymous_namespace{ExpressionRewrite.cpp}::strip_likelihood().
Referenced by RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::makeJoinQuals(), anonymous_namespace{RelAlgExecutor.cpp}::set_transient_dict_maybe(), anonymous_namespace{RelAlgExecutor.cpp}::translate_quals(), anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), anonymous_namespace{RelAlgExecutor.cpp}::translate_targets(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateDatePlusMinus(), RelAlgTranslator::translateGeoComparison(), and RelAlgTranslator::translateGeoFunctionArg().
const int get_max_rte_scan_table | ( | std::unordered_map< int, llvm::Value * > & | scan_idx_to_hash_pos | ) |
Definition at line 1097 of file ExpressionRewrite.cpp.
Referenced by BaselineJoinHashTable::codegenKey(), PerfectJoinHashTable::codegenMatchingSet(), and PerfectJoinHashTable::codegenSlot().
Analyzer::ExpressionPtr rewrite_array_elements | ( | Analyzer::Expr const * | expr | ) |
Definition at line 757 of file ExpressionRewrite.cpp.
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), and anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources_for_update().
Analyzer::ExpressionPtr rewrite_expr | ( | const Analyzer::Expr * | expr | ) |
Definition at line 761 of file ExpressionRewrite.cpp.
References rewrite_avg_window(), rewrite_sum_window(), and anonymous_namespace{ExpressionRewrite.cpp}::strip_likelihood().
Referenced by RelAlgExecutor::createFilterWorkUnit(), qual_to_conjunctive_form(), qual_to_disjunctive_form(), anonymous_namespace{RelAlgExecutor.cpp}::rewrite_quals(), QueryRewriter::rewriteConstrainedByIn(), anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources_for_update(), and anonymous_namespace{RelAlgExecutor.cpp}::translate_targets().
boost::optional<OverlapsJoinConjunction> rewrite_overlaps_conjunction | ( | const std::shared_ptr< Analyzer::Expr > | expr | ) |
Definition at line 820 of file ExpressionRewrite.cpp.
References CHECK, CHECK_EQ, CHECK_GE, g_enable_distance_rangejoin, g_enable_hashjoin_many_to_many, logger::INFO, is_constructed_point(), kBOOLEAN, kGEOGRAPHY, kLE, kLT, kONE, kOVERLAPS, LOG, anonymous_namespace{ExpressionRewrite.cpp}::overlaps_supported_functions, anonymous_namespace{ExpressionRewrite.cpp}::requires_many_to_many, ScalarExprVisitor< T >::visit(), VLOG, and logger::WARNING.
Referenced by QueryRewriter::rewriteOverlapsJoin().
bool self_join_not_covered_by_left_deep_tree | ( | const Analyzer::ColumnVar * | key_side, |
const Analyzer::ColumnVar * | val_side, | ||
const int | max_rte_covered | ||
) |
Definition at line 1086 of file ExpressionRewrite.cpp.
References Analyzer::ColumnVar::get_rte_idx(), and Analyzer::ColumnVar::get_table_id().
Referenced by BaselineJoinHashTable::codegenKey(), PerfectJoinHashTable::codegenMatchingSet(), and PerfectJoinHashTable::codegenSlot().
std::list<std::shared_ptr<Analyzer::Expr> > strip_join_covered_filter_quals | ( | const std::list< std::shared_ptr< Analyzer::Expr >> & | quals, |
const JoinQualsPerNestingLevel & | join_quals | ||
) |
Definition at line 1028 of file ExpressionRewrite.cpp.
References g_strip_join_covered_quals, and ScalarExprVisitor< T >::visit().
Referenced by RelAlgExecutionUnit::createCountAllExecutionUnit().