MCPcopy Create free account
hub / github.com/apache/arrow / GetMatches

Method GetMatches

cpp/src/gandiva/date_utils.cc:28–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace gandiva {
27
28std::vector<std::string> DateUtils::GetMatches(std::string pattern, bool exactMatch) {
29 // we are case-insensitive
30 std::transform(pattern.begin(), pattern.end(), pattern.begin(), ::tolower);
31 std::vector<std::string> matches;
32
33 for (const auto& it : sql_date_format_to_boost_map_) {
34 if (it.first.find(pattern) != std::string::npos &&
35 (!exactMatch || (it.first.length() == pattern.length()))) {
36 matches.push_back(it.first);
37 }
38 }
39
40 return matches;
41}
42
43std::vector<std::string> DateUtils::GetPotentialMatches(const std::string& pattern) {
44 return GetMatches(pattern, false);

Callers

nothing calls this directly

Calls 5

push_backMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected