This is an automated email from the ASF dual-hosted git repository. JingsongLi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/paimon-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 53c12578 [Build] Upgrade paimon-full-text to 0.2.0 (#1344)
53c12578 is described below
commit 53c12578e9d2a1011ba35c18d2b02a2ca1e8c736
Author: Jingsong Lee <[email protected]>
AuthorDate: Mon Nov 9 13:22:35 2026 +0800
[Build] Upgrade paimon-full-text to 0.2.0 (#1344)
---
Cargo.lock | 55 +++++++++++++++++-
DEPENDENCIES.rust.tsv | 6 +-
benchmarks/tpcds/DEPENDENCIES.rust.tsv | 6 +-
bindings/c/DEPENDENCIES.rust.tsv | 6 +-
bindings/go/DEPENDENCIES.rust.tsv | 6 +-
bindings/python/DEPENDENCIES.rust.tsv | 6 +-
crates/integration_tests/DEPENDENCIES.rust.tsv | 6 +-
crates/integrations/datafusion/Cargo.toml | 2 +-
.../integrations/datafusion/DEPENDENCIES.rust.tsv | 6 +-
crates/paimon-rest-server/DEPENDENCIES.rust.tsv | 6 +-
crates/paimon/Cargo.toml | 2 +-
crates/paimon/DEPENDENCIES.rust.tsv | 6 +-
.../table/full_text_index_build_builder/tests.rs | 65 ++++++++++++++++++++++
13 files changed, 165 insertions(+), 13 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 32154484..b6e641fa 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3368,6 +3368,21 @@ dependencies = [
"zerovec",
]
+[[package]]
+name = "icu_locale"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5a396343c7208121dc86e35623d3dfe19814a7613cfd14964994cdc9c9a2e26"
+dependencies = [
+ "icu_collections",
+ "icu_locale_core",
+ "icu_locale_data",
+ "icu_provider",
+ "potential_utf",
+ "tinystr",
+ "zerovec",
+]
+
[[package]]
name = "icu_locale_core"
version = "2.2.0"
@@ -3376,11 +3391,18 @@ checksum =
"92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
dependencies = [
"displaydoc",
"litemap",
+ "serde",
"tinystr",
"writeable",
"zerovec",
]
+[[package]]
+name = "icu_locale_data"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5fdcc9ac77c6d74ff5cf6e65ef3181d6af32003b16fce3a77fb451d2f695993"
+
[[package]]
name = "icu_normalizer"
version = "2.2.0"
@@ -3429,6 +3451,8 @@ checksum =
"139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
dependencies = [
"displaydoc",
"icu_locale_core",
+ "serde",
+ "stable_deref_trait",
"writeable",
"yoke",
"zerofrom",
@@ -3436,6 +3460,27 @@ dependencies = [
"zerovec",
]
+[[package]]
+name = "icu_segmenter"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c0794db0b1a86193ac9c48768d0e6c52c54448e0870ad87907d456ee0dac964"
+dependencies = [
+ "icu_collections",
+ "icu_locale",
+ "icu_provider",
+ "icu_segmenter_data",
+ "potential_utf",
+ "utf8_iter",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_segmenter_data"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4a2c462a4d927d512f5f882a033ddd62f33a05bb9f230d98f736ac3dc85938f"
+
[[package]]
name = "ident_case"
version = "1.0.1"
@@ -4926,10 +4971,11 @@ dependencies = [
[[package]]
name = "paimon-ftindex-core"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c9b761618093284c768eacaa2a93c965c697c60ae1d323b55b44de35a59ae12"
+checksum = "4e1535389a0dc1c5ee3ff33db20e115bf9cf8eaec5566b7c72113073331b4f64"
dependencies = [
+ "icu_segmenter",
"levenshtein_automata",
"roaring",
"serde",
@@ -5378,6 +5424,8 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
dependencies = [
+ "serde_core",
+ "writeable",
"zerovec",
]
@@ -7294,6 +7342,7 @@ source =
"registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"
dependencies = [
"displaydoc",
+ "serde_core",
"zerovec",
]
@@ -8893,6 +8942,7 @@ dependencies = [
"displaydoc",
"yoke",
"zerofrom",
+ "zerovec",
]
[[package]]
@@ -8901,6 +8951,7 @@ version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"
dependencies = [
+ "serde",
"yoke",
"zerofrom",
"zerovec-derive",
diff --git a/DEPENDENCIES.rust.tsv b/DEPENDENCIES.rust.tsv
index 0e39b53f..db6daa83 100644
--- a/DEPENDENCIES.rust.tsv
+++ b/DEPENDENCIES.rust.tsv
@@ -276,12 +276,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -409,7 +413,7 @@ [email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
diff --git a/benchmarks/tpcds/DEPENDENCIES.rust.tsv
b/benchmarks/tpcds/DEPENDENCIES.rust.tsv
index f63518a3..f6739227 100644
--- a/benchmarks/tpcds/DEPENDENCIES.rust.tsv
+++ b/benchmarks/tpcds/DEPENDENCIES.rust.tsv
@@ -207,12 +207,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -310,7 +314,7 @@ [email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
diff --git a/bindings/c/DEPENDENCIES.rust.tsv b/bindings/c/DEPENDENCIES.rust.tsv
index 872dd10d..50dfcf3c 100644
--- a/bindings/c/DEPENDENCIES.rust.tsv
+++ b/bindings/c/DEPENDENCIES.rust.tsv
@@ -160,12 +160,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -265,7 +269,7 @@ [email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
diff --git a/bindings/go/DEPENDENCIES.rust.tsv
b/bindings/go/DEPENDENCIES.rust.tsv
index 872dd10d..50dfcf3c 100644
--- a/bindings/go/DEPENDENCIES.rust.tsv
+++ b/bindings/go/DEPENDENCIES.rust.tsv
@@ -160,12 +160,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -265,7 +269,7 @@ [email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
diff --git a/bindings/python/DEPENDENCIES.rust.tsv
b/bindings/python/DEPENDENCIES.rust.tsv
index a18d0382..d7181669 100644
--- a/bindings/python/DEPENDENCIES.rust.tsv
+++ b/bindings/python/DEPENDENCIES.rust.tsv
@@ -225,12 +225,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -339,7 +343,7 @@ [email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
X
diff --git a/crates/integration_tests/DEPENDENCIES.rust.tsv
b/crates/integration_tests/DEPENDENCIES.rust.tsv
index c3b8cd87..49767b97 100644
--- a/crates/integration_tests/DEPENDENCIES.rust.tsv
+++ b/crates/integration_tests/DEPENDENCIES.rust.tsv
@@ -152,12 +152,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -248,7 +252,7 @@ [email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
diff --git a/crates/integrations/datafusion/Cargo.toml
b/crates/integrations/datafusion/Cargo.toml
index 4dac5fc0..1cbd9202 100644
--- a/crates/integrations/datafusion/Cargo.toml
+++ b/crates/integrations/datafusion/Cargo.toml
@@ -56,7 +56,7 @@ axum = { version = "0.7", features = ["macros", "tokio",
"http1", "http2"] }
bytes = "1.7.1"
flate2 = "1"
opendal = { package = "opendal-core", version = "0.59.5", features =
["services-memory"] }
-paimon-ftindex-core = "0.1.0"
+paimon-ftindex-core = "0.2.0"
parquet = { workspace = true }
tar = "0.4"
tempfile = "3"
diff --git a/crates/integrations/datafusion/DEPENDENCIES.rust.tsv
b/crates/integrations/datafusion/DEPENDENCIES.rust.tsv
index 773ee424..3ed20d5f 100644
--- a/crates/integrations/datafusion/DEPENDENCIES.rust.tsv
+++ b/crates/integrations/datafusion/DEPENDENCIES.rust.tsv
@@ -235,12 +235,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -351,7 +355,7 @@ [email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
X
diff --git a/crates/paimon-rest-server/DEPENDENCIES.rust.tsv
b/crates/paimon-rest-server/DEPENDENCIES.rust.tsv
index bca31d1d..0cd87e93 100644
--- a/crates/paimon-rest-server/DEPENDENCIES.rust.tsv
+++ b/crates/paimon-rest-server/DEPENDENCIES.rust.tsv
@@ -155,12 +155,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -252,7 +256,7 @@ [email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
diff --git a/crates/paimon/Cargo.toml b/crates/paimon/Cargo.toml
index a92f02ab..6f28420b 100644
--- a/crates/paimon/Cargo.toml
+++ b/crates/paimon/Cargo.toml
@@ -157,7 +157,7 @@ md-5 = "0.10"
regex = "1"
uuid = { version = "1", features = ["v4"] }
paimon-mosaic-core = "0.3.0"
-paimon-ftindex-core = "0.1.0"
+paimon-ftindex-core = "0.2.0"
tempfile = "3"
paimon-vindex-core = "0.5.0"
vortex = { version = "0.90.0", features = ["tokio"], optional = true }
diff --git a/crates/paimon/DEPENDENCIES.rust.tsv
b/crates/paimon/DEPENDENCIES.rust.tsv
index a8a77174..a148bd21 100644
--- a/crates/paimon/DEPENDENCIES.rust.tsv
+++ b/crates/paimon/DEPENDENCIES.rust.tsv
@@ -215,12 +215,16 @@ [email protected]
X
[email protected] X
X
[email protected] X
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
X
[email protected] X
X
[email protected] X
X
@@ -341,7 +345,7 @@ [email protected]
X
[email protected]
X
[email protected]
X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
[email protected] X
X
diff --git a/crates/paimon/src/table/full_text_index_build_builder/tests.rs
b/crates/paimon/src/table/full_text_index_build_builder/tests.rs
index 3e57a9f1..2c9b7ab3 100644
--- a/crates/paimon/src/table/full_text_index_build_builder/tests.rs
+++ b/crates/paimon/src/table/full_text_index_build_builder/tests.rs
@@ -308,6 +308,71 @@ async fn
test_execute_passes_prefixed_options_to_native_writer() {
assert_eq!(search(&table, "running").await, vec![RowRange::new(0, 0)]);
}
+#[tokio::test]
+async fn test_icu_split_search_before_and_after_index_build() {
+ let table = test_table("memory:/test_full_text_icu_split",
table_options("10"))
+ .copy_with_options(HashMap::from([
+ ("global-index.full-text.index-columns".into(), "name".into()),
+ ("write-only".into(), "true".into()),
+ ("full-text.tokenizer".into(), "icu/split".into()),
+ ("full-text.stem".into(), "false".into()),
+ ("full-text.remove-stop-words".into(), "false".into()),
+ ("full-text-index.search-mode".into(), "full".into()),
+ ]));
+ setup_dirs(&table).await;
+ write_rows(
+ &table,
+ vec![1, 2, 3],
+ vec![
+ Some("Paimon支持中文搜索 hello_world alpha.beta getUserName"),
+ Some("Paimon支持英文搜索 hello_planet alpha.gamma"),
+ Some("中文 hello brave world alpha delta"),
+ ],
+ )
+ .await;
+ assert!(full_text_entries(&table).await.is_empty());
+
+ for indexed in [false, true] {
+ let table = if indexed {
+ assert_eq!(
+ table
+ .new_global_index_build_builder()
+ .with_index_type("full-text")
+ .with_index_column("name")
+ .execute()
+ .await
+ .unwrap(),
+ 1
+ );
+ // Fast mode requires persisted index hits.
+ table.copy_with_options(HashMap::from([(
+ "full-text-index.search-mode".into(),
+ "fast".into(),
+ )]))
+ } else {
+ table.clone()
+ };
+ for (query, expected) in [
+ ("中文", vec![RowRange::new(0, 0), RowRange::new(2, 2)]),
+ ("world", vec![RowRange::new(0, 0), RowRange::new(2, 2)]),
+ ("beta", vec![RowRange::new(0, 0)]),
+ (
+ r#"{"match_phrase":{"query":"hello world"}}"#,
+ vec![RowRange::new(0, 0)],
+ ),
+ ("getUserName", vec![RowRange::new(0, 0)]),
+ ("user", vec![]),
+ ("missingtoken", vec![]),
+ ] {
+ assert_eq!(
+ search(&table, query).await,
+ expected,
+ "query={query}, indexed={indexed}"
+ );
+ }
+ }
+}
+
#[tokio::test]
async fn test_execute_rejects_invalid_native_options_before_reading() {
let table = test_table(
