diff --git a/src/paimon/common/global_index/bitmap/bitmap_index_reader.cpp b/src/paimon/common/global_index/bitmap/bitmap_index_reader.cpp index 8a38a67a9..4e3e9dfed 100644 --- a/src/paimon/common/global_index/bitmap/bitmap_index_reader.cpp +++ b/src/paimon/common/global_index/bitmap/bitmap_index_reader.cpp @@ -382,7 +382,7 @@ Result BitmapIndexReader::Like(const Literal& literal) { if (key.GetType() != FieldType::STRING) { return false; } - return paimon::Like::Instance().TestString(key.GetValue(), pattern); + return paimon::Like::MatchString(key.GetValue(), pattern); }); } diff --git a/src/paimon/common/predicate/like.cpp b/src/paimon/common/predicate/like.cpp index 3e6d6efe5..d6ee817de 100644 --- a/src/paimon/common/predicate/like.cpp +++ b/src/paimon/common/predicate/like.cpp @@ -51,7 +51,7 @@ inline bool IsJavaRegexLineTerminator(const std::string& code_point) { } // namespace -Result Like::TestString(const std::string& field, const std::string& pattern) const { +Result Like::MatchString(const std::string& field, const std::string& pattern) { if (pattern.empty()) { return field.empty(); } @@ -166,4 +166,8 @@ Result Like::TestString(const std::string& field, const std::string& patte } return static_cast(dp[n]); } + +Result Like::TestString(const std::string& field, const std::string& pattern) const { + return MatchString(field, pattern); +} } // namespace paimon diff --git a/src/paimon/common/predicate/like.h b/src/paimon/common/predicate/like.h index 1434ccf53..d180b29b7 100644 --- a/src/paimon/common/predicate/like.h +++ b/src/paimon/common/predicate/like.h @@ -22,11 +22,15 @@ #include "paimon/common/predicate/string_leaf_binary_function.h" #include "paimon/result.h" +#include "paimon/visibility.h" namespace paimon { /// A `StringLeafBinaryFunction` to eval filter like. class Like : public StringLeafBinaryFunction { public: + PAIMON_EXPORT static Result MatchString(const std::string& field, + const std::string& pattern); + static const Like& Instance() { static const Like instance = Like(); return instance;