OmniSciDB
a5dc49c757
|
#include <SerializeToSql.h>
Public Member Functions | |
ScalarExprToSql (const RelAlgExecutionUnit *ra_exe_unit) | |
std::string | visitVar (const Analyzer::Var *) const override |
std::string | visitColumnVar (const Analyzer::ColumnVar *col_var) const override |
std::string | visitConstant (const Analyzer::Constant *constant) const override |
std::string | visitUOper (const Analyzer::UOper *uoper) const override |
std::string | visitBinOper (const Analyzer::BinOper *bin_oper) const override |
std::string | visitInValues (const Analyzer::InValues *in_values) const override |
std::string | visitLikeExpr (const Analyzer::LikeExpr *like) const override |
std::string | visitCaseExpr (const Analyzer::CaseExpr *case_) const override |
std::string | visitFunctionOper (const Analyzer::FunctionOper *func_oper) const override |
std::string | visitWindowFunction (const Analyzer::WindowFunction *window_func) const override |
std::string | visitAggExpr (const Analyzer::AggExpr *agg) const override |
template<typename List > | |
std::vector< std::string > | visitList (const List &expressions) const |
Public Member Functions inherited from ScalarExprVisitor< std::string > | |
std::string | visit (const Analyzer::Expr *expr) const |
Protected Member Functions | |
std::string | aggregateResult (const std::string &aggregate, const std::string &next_result) const override |
std::string | defaultResult () const override |
Protected Member Functions inherited from ScalarExprVisitor< std::string > | |
virtual std::string | visitColumnVarTuple (const Analyzer::ExpressionTuple *) const |
virtual std::string | visitGeoExpr (const Analyzer::GeoExpr *geo_expr) const |
virtual std::string | visitInIntegerSet (const Analyzer::InIntegerSet *in_integer_set) const |
virtual std::string | visitCharLength (const Analyzer::CharLengthExpr *char_length) const |
virtual std::string | visitKeyForString (const Analyzer::KeyForStringExpr *key_for_string) const |
virtual std::string | visitSampleRatio (const Analyzer::SampleRatioExpr *sample_ratio) const |
virtual std::string | visitStringOper (const Analyzer::StringOper *string_oper) const |
virtual std::string | visitCardinality (const Analyzer::CardinalityExpr *cardinality) const |
virtual std::string | visitRegexpExpr (const Analyzer::RegexpExpr *regexp) const |
virtual std::string | visitWidthBucket (const Analyzer::WidthBucketExpr *width_bucket_expr) const |
virtual std::string | visitMLPredict (const Analyzer::MLPredictExpr *ml_predict_expr) const |
virtual std::string | visitPCAProject (const Analyzer::PCAProjectExpr *pca_project_expr) const |
virtual std::string | visitDatetruncExpr (const Analyzer::DatetruncExpr *datetrunc) const |
virtual std::string | visitExtractExpr (const Analyzer::ExtractExpr *extract) const |
virtual std::string | visitFunctionOperWithCustomTypeHandling (const Analyzer::FunctionOperWithCustomTypeHandling *func_oper) const |
virtual std::string | visitArrayOper (Analyzer::ArrayExpr const *array_expr) const |
virtual std::string | visitGeoUOper (const Analyzer::GeoUOper *geo_expr) const |
virtual std::string | visitGeoBinOper (const Analyzer::GeoBinOper *geo_expr) const |
virtual std::string | visitDatediffExpr (const Analyzer::DatediffExpr *datediff) const |
virtual std::string | visitDateaddExpr (const Analyzer::DateaddExpr *dateadd) const |
virtual std::string | visitLikelihood (const Analyzer::LikelihoodExpr *likelihood) const |
virtual std::string | visitOffsetInFragment (const Analyzer::OffsetInFragment *) const |
virtual std::string | visitRangeJoinOper (const Analyzer::RangeOper *range_oper) const |
virtual void | visitBegin () const |
Static Private Member Functions | |
static std::string | binOpTypeToString (const SQLOps op_type) |
Private Attributes | |
const RelAlgExecutionUnit * | ra_exe_unit_ |
Definition at line 23 of file SerializeToSql.h.
ScalarExprToSql::ScalarExprToSql | ( | const RelAlgExecutionUnit * | ra_exe_unit | ) |
Definition at line 20 of file SerializeToSql.cpp.
|
inlineoverrideprotectedvirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 54 of file SerializeToSql.h.
|
staticprivate |
Definition at line 186 of file SerializeToSql.cpp.
References logger::FATAL, kAND, kARRAY_AT, kBBOX_INTERSECT, kDIVIDE, kEQ, kGE, kGT, kLE, kLT, kMINUS, kMODULO, kMULTIPLY, kNE, kOR, kPLUS, and LOG.
Referenced by visitBinOper().
|
inlineoverrideprotectedvirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 59 of file SerializeToSql.h.
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 182 of file SerializeToSql.cpp.
References anonymous_namespace{SerializeToSql.cpp}::agg_to_string(), and ra_exe_unit_.
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 84 of file SerializeToSql.cpp.
References binOpTypeToString(), Analyzer::BinOper::get_left_operand(), Analyzer::BinOper::get_optype(), Analyzer::BinOper::get_right_operand(), and ScalarExprVisitor< std::string >::visit().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 107 of file SerializeToSql.cpp.
References Analyzer::CaseExpr::get_else_expr(), Analyzer::CaseExpr::get_expr_pair_list(), and ScalarExprVisitor< std::string >::visit().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 29 of file SerializeToSql.cpp.
References Catalog_Namespace::SysCatalog::getCatalog(), Analyzer::ColumnVar::getColumnKey(), Catalog_Namespace::SysCatalog::instance(), serialize_column_ref(), and serialize_table_ref().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 37 of file SerializeToSql.cpp.
References DatumToString(), Analyzer::Constant::get_constval(), Analyzer::Constant::get_is_null(), Analyzer::Expr::get_type_info(), and run_benchmark_import::result.
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 132 of file SerializeToSql.cpp.
References CHECK_EQ, Analyzer::FunctionOper::getArg(), Analyzer::FunctionOper::getArity(), Analyzer::FunctionOper::getName(), join(), run_benchmark_import::result, and ScalarExprVisitor< std::string >::visit().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 90 of file SerializeToSql.cpp.
References Analyzer::InValues::get_arg(), Analyzer::InValues::get_value_list(), join(), ScalarExprVisitor< std::string >::visit(), and visitList().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 96 of file SerializeToSql.cpp.
References Analyzer::LikeExpr::get_arg(), Analyzer::LikeExpr::get_escape_expr(), Analyzer::LikeExpr::get_like_expr(), run_benchmark_import::result, and ScalarExprVisitor< std::string >::visit().
std::vector< std::string > ScalarExprToSql::visitList | ( | const List & | expressions | ) | const |
Definition at line 225 of file SerializeToSql.cpp.
References run_benchmark_import::result, and ScalarExprVisitor< std::string >::visit().
Referenced by anonymous_namespace{SerializeToSql.cpp}::group_by_to_string(), anonymous_namespace{SerializeToSql.cpp}::join_condition_to_string(), visitInValues(), visitWindowFunction(), and anonymous_namespace{SerializeToSql.cpp}::where_to_string().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 50 of file SerializeToSql.cpp.
References Analyzer::UOper::get_operand(), Analyzer::UOper::get_optype(), Analyzer::Expr::get_type_info(), SQLTypeInfo::get_type_name(), is_supported_type_for_extern_execution(), kCAST, kISNULL, kNOT, kUMINUS, to_string(), and ScalarExprVisitor< std::string >::visit().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 23 of file SerializeToSql.cpp.
References Analyzer::Var::get_varno(), RelAlgExecutionUnit::groupby_exprs, ra_exe_unit_, and ScalarExprVisitor< std::string >::visit().
|
overridevirtual |
Reimplemented from ScalarExprVisitor< std::string >.
Definition at line 149 of file SerializeToSql.cpp.
References CHECK_EQ, Analyzer::WindowFunction::getArgs(), Analyzer::WindowFunction::getCollation(), Analyzer::WindowFunction::getKind(), Analyzer::WindowFunction::getOrderKeys(), Analyzer::WindowFunction::getPartitionKeys(), join(), run_benchmark_import::result, toString(), ScalarExprVisitor< std::string >::visit(), and visitList().
|
private |
Definition at line 66 of file SerializeToSql.h.
Referenced by visitAggExpr(), and visitVar().