OmniSciDB
c1a53651b2
|
#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} | |
std::shared_ptr<Analyzer::Expr> fold_expr | ( | const Analyzer::Expr * | expr | ) |
Definition at line 1175 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 1220 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 765 of file ExpressionRewrite.cpp.
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources_for_update(), and anonymous_namespace{RelAlgExecutor.cpp}::translate_targets().
Analyzer::ExpressionPtr rewrite_expr | ( | const Analyzer::Expr * | expr | ) |
Definition at line 769 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, |
const std::vector< InputDescriptor > & | input_table_info, | ||
const OverlapsJoinRewriteType | rewrite_type, | ||
const Executor * | executor | ||
) |
Definition at line 794 of file ExpressionRewrite.cpp.
References run_benchmark_import::args, CHECK, CHECK_EQ, CHECK_GE, Analyzer::Expr::collect_rte_idx(), convert_to_range_join_oper(), g_enable_hashjoin_many_to_many, Catalog_Namespace::get_metadata_for_table(), logger::INFO, is_constructed_point(), OverlapsJoinSupportedFunction::is_many_to_many_func(), OverlapsJoinSupportedFunction::is_point_poly_rewrite_target_func(), OverlapsJoinSupportedFunction::is_poly_mpoly_rewrite_target_func(), OverlapsJoinSupportedFunction::is_poly_point_rewrite_target_func(), OverlapsJoinSupportedFunction::is_range_join_rewrite_target_func(), kARRAY, kBOOLEAN, kDOUBLE, kGEOGRAPHY, kLE, kONE, kOVERLAPS, kPOINT, LOG, OVERLAPS_JOIN, RANGE_JOIN, OverlapsJoinSupportedFunction::ST_APPROX_OVERLAPS_MULTIPOLYGON_POINT_sv, OverlapsJoinSupportedFunction::ST_DISTANCE_sv, OverlapsJoinSupportedFunction::ST_DWITHIN_POINT_POINT_sv, OverlapsJoinSupportedFunction::ST_OVERLAPS_sv, 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 1209 of file ExpressionRewrite.cpp.
References Analyzer::ColumnVar::get_rte_idx(), and Analyzer::ColumnVar::getTableKey().
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 1151 of file ExpressionRewrite.cpp.
References g_strip_join_covered_quals, and ScalarExprVisitor< T >::visit().
Referenced by RelAlgExecutionUnit::createCountAllExecutionUnit().