OmniSciDB
a5dc49c757
|
Namespaces | |
anonymous_namespace{StringOps.cpp} | |
Classes | |
struct | StringOpInfo |
Typedefs | |
using | LiteralArgMap = std::map< size_t, std::pair< SQLTypes, Datum >> |
Functions | |
std::ostream & | operator<< (std::ostream &stream, const StringOpInfo &string_op_info) |
std::ostream & | operator<< (std::ostream &stream, const std::vector< StringOpInfo > &string_op_infos) |
std::string | toString (const std::vector< StringOpInfo > &string_op_infos) |
double | compute_jaro_score (std::string_view s1, std::string_view s2) |
double | compute_jaro_winkler_score (std::string_view s1, std::string_view s2) |
template<typename T > | |
T | compute_levenshtein_distance_template (std::string_view s1, std::string_view s2) |
int64_t | compute_levenshtein_distance (std::string_view s1, std::string_view s2) |
std::unique_ptr< const StringOp > | gen_string_op (const StringOpInfo &string_op_info) |
std::pair< std::string, bool > | apply_string_op_to_literals (const StringOpInfo &string_op_info) |
Datum | apply_numeric_op_to_literals (const StringOpInfo &string_op_info) |
Variables | |
constexpr int | winkler_k_prefix_length = 4 |
constexpr double | winkler_k_scaling_factor = 0.1 |
using StringOps_Namespace::LiteralArgMap = typedef std::map<size_t, std::pair<SQLTypes, Datum>> |
Definition at line 30 of file StringOpInfo.h.
Datum StringOps_Namespace::apply_numeric_op_to_literals | ( | const StringOpInfo & | string_op_info | ) |
Definition at line 1283 of file StringOps.cpp.
References CHECK, gen_string_op(), and StringOps_Namespace::StringOpInfo::hasVarStringLiteral().
Referenced by anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitStringOper().
std::pair<std::string, bool > StringOps_Namespace::apply_string_op_to_literals | ( | const StringOpInfo & | string_op_info | ) |
Definition at line 1272 of file StringOps.cpp.
References CHECK, gen_string_op(), StringOps_Namespace::StringOpInfo::hasNullLiteralArg(), and StringOps_Namespace::StringOpInfo::hasVarStringLiteral().
Referenced by TransientStringLiteralsVisitor::visitStringOper(), and anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitStringOper().
double StringOps_Namespace::compute_jaro_score | ( | std::string_view | s1, |
std::string_view | s2 | ||
) |
Definition at line 127 of file StringOps.cpp.
References score.
Referenced by compute_jaro_winkler_score().
double StringOps_Namespace::compute_jaro_winkler_score | ( | std::string_view | s1, |
std::string_view | s2 | ||
) |
Definition at line 185 of file StringOps.cpp.
References Datum::bigintval, compute_jaro_score(), anonymous_namespace{Utm.h}::n, NullDatum(), UNREACHABLE, winkler_k_prefix_length, and winkler_k_scaling_factor.
int64_t StringOps_Namespace::compute_levenshtein_distance | ( | std::string_view | s1, |
std::string_view | s2 | ||
) |
Definition at line 278 of file StringOps.cpp.
T StringOps_Namespace::compute_levenshtein_distance_template | ( | std::string_view | s1, |
std::string_view | s2 | ||
) |
Definition at line 255 of file StringOps.cpp.
std::unique_ptr<const StringOp> StringOps_Namespace::gen_string_op | ( | const StringOpInfo & | string_op_info | ) |
Definition at line 1039 of file StringOps.cpp.
References BASE64_DECODE, BASE64_ENCODE, CHECK_EQ, CHECK_GE, CHECK_LE, CONCAT, StringOps_Namespace::StringOpInfo::getIntLiteral(), StringOps_Namespace::StringOpInfo::getOpKind(), StringOps_Namespace::StringOpInfo::getReturnType(), StringOps_Namespace::StringOpInfo::getStringLiteral(), HASH, StringOps_Namespace::StringOpInfo::hasNullLiteralArg(), StringOps_Namespace::StringOpInfo::hasVarStringLiteral(), INITCAP, StringOps_Namespace::StringOpInfo::intLiteralArgAtIdxExists(), JAROWINKLER_SIMILARITY, JSON_VALUE, LEVENSHTEIN_DISTANCE, LOWER, LPAD, LTRIM, StringOps_Namespace::StringOpInfo::numLiterals(), StringOps_Namespace::StringOpInfo::numNonVariableLiterals(), OVERLAY, POSITION, RCONCAT, REGEXP_COUNT, REGEXP_REPLACE, REGEXP_SUBSTR, REPEAT, REPLACE, REVERSE, RPAD, RTRIM, SPLIT_PART, SUBSTRING, TRIM, TRY_STRING_CAST, UNREACHABLE, UPPER, URL_DECODE, and URL_ENCODE.
Referenced by apply_numeric_op_to_literals(), and apply_string_op_to_literals().
std::ostream& StringOps_Namespace::operator<< | ( | std::ostream & | stream, |
const StringOpInfo & | string_op_info | ||
) |
Definition at line 24 of file StringOpInfo.cpp.
References CHECK, extract_int_type_from_datum(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_type(), StringOps_Namespace::StringOpInfo::getOpKind(), StringOps_Namespace::StringOpInfo::getReturnType(), IS_INTEGER, IS_STRING, StringOps_Namespace::StringOpInfo::isLiteralArgNull(), StringOps_Namespace::StringOpInfo::literal_arg_map_, and toString().
std::ostream & StringOps_Namespace::operator<< | ( | std::ostream & | stream, |
const std::vector< StringOpInfo > & | string_op_infos | ||
) |
Definition at line 55 of file StringOpInfo.cpp.
std::string StringOps_Namespace::toString | ( | const std::vector< StringOpInfo > & | string_op_infos | ) |
Definition at line 70 of file StringOpInfo.cpp.
Referenced by operator<<().
constexpr int StringOps_Namespace::winkler_k_prefix_length = 4 |
Definition at line 122 of file StringOps.cpp.
Referenced by compute_jaro_winkler_score().
constexpr double StringOps_Namespace::winkler_k_scaling_factor = 0.1 |
Definition at line 125 of file StringOps.cpp.
Referenced by compute_jaro_winkler_score().