53 if (!(uoper->
get_optype() ==
kCAST && uoper_ti.is_dict_encoded_string())) {
56 const bool outputs_target_sdp = uoper_ti.getStringDictKey() ==
sdp_->
getDictKey();
62 if (uoper_ti.is_dict_intersection()) {
72 if (!parent_feeds_sdp_already_set) {
76 if (operand_ti.is_dict_encoded_string() &&
77 uoper_ti.getStringDictKey() != operand_ti.getStringDictKey()) {
79 operand_ti.getStringDictKey(),
80 uoper_ti.getStringDictKey(),
91 const auto str_operand = string_oper->
getArg(0);
93 const auto& str_operand_ti = str_operand->get_type_info();
94 const auto string_oper_kind = string_oper->
get_kind();
95 if (!string_oper_ti.is_string() || !str_operand_ti.is_string()) {
102 const bool outputs_target_sdp =
104 if (string_oper_ti.is_dict_encoded_string() &&
105 str_operand_ti.is_dict_encoded_string() &&
109 if (!parent_feeds_sdp_already_set) {
116 std::vector<StringOps_Namespace::StringOpInfo> string_op_infos;
118 for (
const auto& chained_string_op_expr : chained_string_op_exprs) {
119 auto chained_string_op =
121 CHECK(chained_string_op);
123 chained_string_op->get_kind(),
124 chained_string_op->get_type_info(),
125 chained_string_op->getLiteralArgs());
126 string_op_infos.emplace_back(string_op_info);
130 str_operand_ti.getStringDictKey(),
131 string_oper_ti.getStringDictKey(),
145 const auto str_result_and_null_status =
148 !str_result_and_null_status.second &&
149 !str_result_and_null_status.first
181 if (expr_ti.is_string() && expr_ti.get_compression() ==
kENCODING_DICT) {
190 if (expr_ti.is_string() && expr_ti.get_compression() ==
kENCODING_DICT) {
StringDictionaryProxy * sdp_
const std::shared_ptr< RowSetMemoryOwner > getRowSetMemoryOwner() const
void * visitStringOper(const Analyzer::StringOper *string_oper) const override
void * visitUOper(const Analyzer::UOper *uoper) const override
void * visitConstant(const Analyzer::Constant *constant) const override
const StringDictionaryProxy::IdMap * getStringProxyTranslationMap(const shared::StringDictKey &source_dict_key, const shared::StringDictKey &dest_dict_key, const RowSetMemoryOwner::StringTranslationType translation_type, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const bool with_generation) const
void * visit(const Analyzer::Expr *expr) const
shared::StringDictKey defaultResult() const override
size_t getLiteralsArity() const
shared::StringDictKey visitStringOper(const Analyzer::StringOper *string_oper) const override
LiteralArgMap getLiteralArgs() const
TransientStringLiteralsVisitor(StringDictionaryProxy *sdp, Executor *executor)
std::pair< std::string, bool > apply_string_op_to_literals(const StringOpInfo &string_op_info)
shared::StringDictKey visitUOper(const Analyzer::UOper *uoper) const override
int32_t getOrAddTransient(const std::string &)
const SQLTypeInfo & get_type_info() const
Expression class for string functions The "arg" constructor parameter must be an expression that reso...
SqlStringOpKind get_kind() const
const Expr * get_operand() const
Datum get_constval() const
void * defaultResult() const override
const shared::StringDictKey & getDictKey() const noexcept
size_t getNonLiteralsArity() const
std::vector< std::shared_ptr< Analyzer::Expr > > getChainedStringOpExprs() const
shared::StringDictKey visitCaseExpr(const Analyzer::CaseExpr *case_expr) const override
const Expr * getArg(const size_t i) const
SQLOps get_optype() const
const shared::StringDictKey & getStringDictKey() const