22 namespace StringOps_Namespace {
26 <<
"operator: " << string_op_info.
getOpKind()
30 bool first_elem =
true;
36 const auto datum_type = literal_arg.second.first;
37 const auto& datum = literal_arg.second.second;
38 stream <<
"{slot: " << literal_arg.first <<
", type: "
40 if (string_op_info.
isLiteralArgNull(datum_type, literal_arg.second.second)) {
43 stream << *datum.stringval;
56 const std::vector<StringOpInfo>& string_op_infos) {
58 bool first_elem =
true;
59 for (
const auto& string_op_info : string_op_infos) {
64 stream << string_op_info;
70 std::string
toString(
const std::vector<StringOpInfo>& string_op_infos) {
71 std::ostringstream oss;
72 oss << string_op_infos;
99 str_literal_datum->second.second));
100 return *str_literal_datum->second.second.stringval;
106 const auto& datum_type = literal_datum->second.first;
108 const auto& datum = literal_datum->second.second;
115 std::ostringstream oss;
121 if (datum_type ==
kNULLT) {
132 return datum.
stringval ==
nullptr ? 1UL : 0UL;
136 size_t num_null_literals{0UL};
137 for (
const auto& literal_arg : literal_arg_map) {
138 const auto& datum_type = literal_arg.second.first;
139 const auto& datum = literal_arg.second.second;
142 return num_null_literals;
const SQLTypeInfo & getReturnType() const
bool stringLiteralArgAtIdxExists(const size_t index) const
static size_t calcNumNullLiteralArgs(const LiteralArgMap &literal_arg_map)
static bool isLiteralArgNull(const SQLTypes datum_type, const Datum &datum)
HOST DEVICE int get_scale() const
std::map< size_t, std::pair< SQLTypes, Datum >> LiteralArgMap
bool intLiteralArgAtIdxExists(const size_t index) const
HOST DEVICE SQLTypes get_type() const
int64_t getIntLiteral(const size_t index) const
std::string toString(const std::vector< StringOpInfo > &string_op_infos)
int64_t extract_int_type_from_datum(const Datum datum, const SQLTypeInfo &ti)
HOST DEVICE bool is_null(const Datum &d) const
std::ostream & operator<<(std::ostream &stream, const StringOpInfo &string_op_info)
const LiteralArgMap literal_arg_map_
HOST DEVICE int get_dimension() const
std::string getStringLiteral(const size_t index) const
std::string toString() const
const SqlStringOpKind & getOpKind() const