This is an automated email from the ASF dual-hosted git repository.

lxy-9602 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 7e185774 fix(predicate): export Like symbols (#391)
7e185774 is described below

commit 7e1857742249b620b68ee8d779a61257585ff049
Author: wl_lian <[email protected]>
AuthorDate: Sun Sep 27 18:44:43 2026 +0800

    fix(predicate): export Like symbols (#391)
---
 src/paimon/common/global_index/bitmap/bitmap_index_reader.cpp | 2 +-
 src/paimon/common/predicate/like.cpp                          | 6 +++++-
 src/paimon/common/predicate/like.h                            | 4 ++++
 3 files changed, 10 insertions(+), 2 deletions(-)

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 8a38a67a..4e3e9dfe 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<RoaringBitmap64> BitmapIndexReader::Like(const 
Literal& literal) {
         if (key.GetType() != FieldType::STRING) {
             return false;
         }
-        return 
paimon::Like::Instance().TestString(key.GetValue<std::string>(), pattern);
+        return paimon::Like::MatchString(key.GetValue<std::string>(), pattern);
     });
 }
 
diff --git a/src/paimon/common/predicate/like.cpp 
b/src/paimon/common/predicate/like.cpp
index 3e6d6efe..d6ee817d 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<bool> Like::TestString(const std::string& field, const std::string& 
pattern) const {
+Result<bool> Like::MatchString(const std::string& field, const std::string& 
pattern) {
     if (pattern.empty()) {
         return field.empty();
     }
@@ -166,4 +166,8 @@ Result<bool> Like::TestString(const std::string& field, 
const std::string& patte
     }
     return static_cast<bool>(dp[n]);
 }
+
+Result<bool> 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 1434ccf5..d180b29b 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<bool> MatchString(const std::string& field,
+                                                  const std::string& pattern);
+
     static const Like& Instance() {
         static const Like instance = Like();
         return instance;

Reply via email to