This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new d3b62affbe [full-text][python] Use released full-text index 0.1.0
(#8798)
d3b62affbe is described below
commit d3b62affbe1a14b6c9c2357366405ed8a33db515
Author: Jingsong Lee <[email protected]>
AuthorDate: Wed Jul 22 18:20:50 2026 +0800
[full-text][python] Use released full-text index 0.1.0 (#8798)
---
.github/workflows/check-licensing.yml | 2 -
.github/workflows/install-paimon-full-text.sh | 82 ----------------------
.github/workflows/paimon-python-checks.yml | 21 +-----
.github/workflows/utcase-full-text.yml | 11 ---
.github/workflows/utitcase-flink-1.x-others.yml | 3 -
.github/workflows/utitcase-flink-2.x-jdk11.yml | 3 -
.github/workflows/utitcase-jdk11.yml | 2 -
.github/workflows/utitcase-spark-3.x.yml | 3 -
.github/workflows/utitcase-spark-4.x.yml | 3 -
.github/workflows/utitcase.yml | 3 -
.../multimodal-table/global-index/full-text.mdx | 8 ++-
docs/docs/pypaimon/cli.md | 10 ++-
.../index/JavaPyNativeFullTextE2ETest.java | 13 ----
.../index/NativeFullTextGlobalIndexTest.java | 8 ---
.../index/NativePrimaryKeyFullTextIndexTest.java | 8 ---
paimon-python/dev/lint-python.sh | 7 +-
paimon-python/dev/requirements-dev.txt | 2 +
paimon-python/dev/run_mixed_tests.sh | 8 +--
.../native_full_text_global_index_reader.py | 9 ++-
.../full_text/native_full_text_index_writer.py | 3 +-
.../pypaimon/table/source/full_text_read.py | 4 +-
paimon-python/setup.py | 3 +
pom.xml | 2 +-
23 files changed, 42 insertions(+), 176 deletions(-)
diff --git a/.github/workflows/check-licensing.yml
b/.github/workflows/check-licensing.yml
index aacf375f01..207cdd13fa 100644
--- a/.github/workflows/check-licensing.yml
+++ b/.github/workflows/check-licensing.yml
@@ -50,8 +50,6 @@ jobs:
with:
java-version: 8
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
- name: Build
run: |
set -o pipefail
diff --git a/.github/workflows/install-paimon-full-text.sh
b/.github/workflows/install-paimon-full-text.sh
deleted file mode 100644
index ced2b006a1..0000000000
--- a/.github/workflows/install-paimon-full-text.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-################################################################################
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-#!/usr/bin/env bash
-
-set -euo pipefail
-
-mode="${1:-java}"
-workspace="${GITHUB_WORKSPACE:-$(pwd)}"
-paimon_full_text_parent="${PAIMON_FULL_TEXT_PARENT_DIR:-${RUNNER_TEMP:-${workspace}/..}}"
-paimon_full_text_dir="${PAIMON_FULL_TEXT_DIR:-${paimon_full_text_parent}/paimon-full-text}"
-paimon_full_text_ref="${PAIMON_FULL_TEXT_REF:-main}"
-paimon_full_text_repository="${PAIMON_FULL_TEXT_REPOSITORY:-https://github.com/apache/paimon-full-text.git}"
-
-if [[ "${mode}" != "java" && "${mode}" != "native" ]]; then
- echo "Usage: $0 [java|native]" >&2
- exit 1
-fi
-
-echo "Preparing paimon-full-text from
${paimon_full_text_repository}@${paimon_full_text_ref}"
-mkdir -p "$(dirname "${paimon_full_text_dir}")"
-
-if [[ -e "${paimon_full_text_dir}" && ! -d "${paimon_full_text_dir}/.git" ]];
then
- rm -rf "${paimon_full_text_dir}"
-fi
-
-if [[ ! -d "${paimon_full_text_dir}/.git" ]]; then
- git init "${paimon_full_text_dir}"
- git -C "${paimon_full_text_dir}" remote add origin
"${paimon_full_text_repository}"
-else
- git -C "${paimon_full_text_dir}" remote set-url origin
"${paimon_full_text_repository}"
-fi
-
-git -C "${paimon_full_text_dir}" fetch --depth=1 origin
"${paimon_full_text_ref}"
-git -C "${paimon_full_text_dir}" checkout --force FETCH_HEAD
-
-echo "PAIMON_FULL_TEXT_DIR=${paimon_full_text_dir}"
-if [[ -n "${GITHUB_ENV:-}" ]]; then
- echo "PAIMON_FULL_TEXT_DIR=${paimon_full_text_dir}" >> "${GITHUB_ENV}"
-fi
-
-if [[ "${mode}" == "native" ]]; then
- cargo build --manifest-path "${paimon_full_text_dir}/Cargo.toml" --release \
- -p paimon-ftindex-jni \
- -p paimon-ftindex-ffi
-
- case "$(uname -s)" in
- Darwin)
- lib_extension="dylib"
- ;;
- *)
- lib_extension="so"
- ;;
- esac
-
-
jni_lib="${paimon_full_text_dir}/target/release/libpaimon_ftindex_jni.${lib_extension}"
-
ffi_lib="${paimon_full_text_dir}/target/release/libpaimon_ftindex_ffi.${lib_extension}"
-
- echo "PAIMON_FTINDEX_JNI_LIB_PATH=${jni_lib}"
- echo "PAIMON_FTINDEX_LIB_PATH=${ffi_lib}"
- if [[ -n "${GITHUB_ENV:-}" ]]; then
- echo "PAIMON_FTINDEX_JNI_LIB_PATH=${jni_lib}" >> "${GITHUB_ENV}"
- echo "PAIMON_FTINDEX_LIB_PATH=${ffi_lib}" >> "${GITHUB_ENV}"
- fi
-fi
-
-mvn -B -ntp -f "${paimon_full_text_dir}/java/pom.xml" install -DskipTests
diff --git a/.github/workflows/paimon-python-checks.yml
b/.github/workflows/paimon-python-checks.yml
index c3b35b7f4c..efa187367b 100755
--- a/.github/workflows/paimon-python-checks.yml
+++ b/.github/workflows/paimon-python-checks.yml
@@ -24,13 +24,11 @@ on:
- 'paimon-python/**'
- '!**/*.md'
- '.github/workflows/paimon-python-checks.yml'
- - '.github/workflows/install-paimon-full-text.sh'
pull_request:
paths:
- 'paimon-python/**'
- '!**/*.md'
- '.github/workflows/paimon-python-checks.yml'
- - '.github/workflows/install-paimon-full-text.sh'
env:
JDK_VERSION: 8
@@ -87,21 +85,11 @@ jobs:
mvn -version
- name: Install Rust toolchain
- if: matrix.python-version != '3.7'
+ if: matrix.python-version == '3.11'
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s --
-y --default-toolchain stable --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- - name: Install paimon-full-text dependency
- shell: bash
- run: |
- # 3.7 runs no native full-text tests; the Java artifact is enough.
- if [[ "${{ matrix.python-version }}" == "3.7" ]]; then
- bash .github/workflows/install-paimon-full-text.sh java
- else
- bash .github/workflows/install-paimon-full-text.sh native
- fi
-
- name: Verify Python version
run: python --version
@@ -159,13 +147,6 @@ jobs:
fi
df -h
- - name: Install paimon-full-text Python dependency
- if: matrix.python-version != '3.6.15' && matrix.python-version != '3.7'
- shell: bash
- run: |
- python -m pip install "${PAIMON_FULL_TEXT_DIR}/python"
-
-
- name: Run lint-python.sh
shell: bash
run: |
diff --git a/.github/workflows/utcase-full-text.yml
b/.github/workflows/utcase-full-text.yml
index 06067930a1..c9904529cf 100644
--- a/.github/workflows/utcase-full-text.yml
+++ b/.github/workflows/utcase-full-text.yml
@@ -24,13 +24,11 @@ on:
- 'paimon-full-text/**'
- 'pom.xml'
- '.github/workflows/utcase-full-text.yml'
- - '.github/workflows/install-paimon-full-text.sh'
pull_request:
paths:
- 'paimon-full-text/**'
- 'pom.xml'
- '.github/workflows/utcase-full-text.yml'
- - '.github/workflows/install-paimon-full-text.sh'
env:
JDK_VERSION: 8
@@ -54,15 +52,6 @@ jobs:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install Rust toolchain
- run: |
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s --
-y --default-toolchain stable --profile minimal
- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
-
- - name: Install paimon-full-text native dependency
- run: |
- bash .github/workflows/install-paimon-full-text.sh native
-
- name: Build and test full-text module
timeout-minutes: 30
run: |
diff --git a/.github/workflows/utitcase-flink-1.x-others.yml
b/.github/workflows/utitcase-flink-1.x-others.yml
index 38883d1680..d042f1a8ed 100644
--- a/.github/workflows/utitcase-flink-1.x-others.yml
+++ b/.github/workflows/utitcase-flink-1.x-others.yml
@@ -56,9 +56,6 @@ jobs:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
-
- name: Build Flink
run: |
mvn -T 2C -B -ntp clean install -DskipTests -Pflink1,spark3
diff --git a/.github/workflows/utitcase-flink-2.x-jdk11.yml
b/.github/workflows/utitcase-flink-2.x-jdk11.yml
index 8e47570fc0..b1b6005867 100644
--- a/.github/workflows/utitcase-flink-2.x-jdk11.yml
+++ b/.github/workflows/utitcase-flink-2.x-jdk11.yml
@@ -56,9 +56,6 @@ jobs:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
-
- name: Build Flink
run: |
mvn -T 2C -B -ntp clean install -DskipTests -Pflink2,spark3
diff --git a/.github/workflows/utitcase-jdk11.yml
b/.github/workflows/utitcase-jdk11.yml
index 9bdc57d59b..a6ae09a52b 100644
--- a/.github/workflows/utitcase-jdk11.yml
+++ b/.github/workflows/utitcase-jdk11.yml
@@ -54,8 +54,6 @@ jobs:
with:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
- name: Build
run: mvn -T 1C -B -ntp clean install -DskipTests -Pflink1,spark3
- name: Test
diff --git a/.github/workflows/utitcase-spark-3.x.yml
b/.github/workflows/utitcase-spark-3.x.yml
index e718b9ec5f..0fe7923060 100644
--- a/.github/workflows/utitcase-spark-3.x.yml
+++ b/.github/workflows/utitcase-spark-3.x.yml
@@ -59,9 +59,6 @@ jobs:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
-
- name: Build Spark 3 with ${{ matrix.scala_version }}
run: mvn -T 2C -B -ntp clean install -DskipTests
-Pspark3,flink1,scala-${{ matrix.scala_version }}
diff --git a/.github/workflows/utitcase-spark-4.x.yml
b/.github/workflows/utitcase-spark-4.x.yml
index 5442af6c5a..72c43c018e 100644
--- a/.github/workflows/utitcase-spark-4.x.yml
+++ b/.github/workflows/utitcase-spark-4.x.yml
@@ -56,9 +56,6 @@ jobs:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
-
- name: Build Spark
run: mvn -T 2C -B -ntp clean install -DskipTests -Pspark4,flink1
diff --git a/.github/workflows/utitcase.yml b/.github/workflows/utitcase.yml
index 92b32c335c..e83be074f4 100644
--- a/.github/workflows/utitcase.yml
+++ b/.github/workflows/utitcase.yml
@@ -56,9 +56,6 @@ jobs:
java-version: ${{ env.JDK_VERSION }}
distribution: 'temurin'
- - name: Install paimon-full-text Java dependency
- run: bash .github/workflows/install-paimon-full-text.sh java
-
- name: Build Others
run: |
echo "Start compiling modules"
diff --git a/docs/docs/multimodal-table/global-index/full-text.mdx
b/docs/docs/multimodal-table/global-index/full-text.mdx
index bd7bb767e1..ae8ea59d61 100644
--- a/docs/docs/multimodal-table/global-index/full-text.mdx
+++ b/docs/docs/multimodal-table/global-index/full-text.mdx
@@ -109,8 +109,12 @@ added_files = table.create_global_index(
print(added_files)
```
-PyPaimon full-text build and query require the `paimon_ftindex` Python package
-and the native FFI library from `paimon-full-text`.
+Install the PyPaimon full-text extra before building or querying full-text
+indexes:
+
+```shell
+pip install 'pypaimon[full-text]'
+```
</TabItem>
diff --git a/docs/docs/pypaimon/cli.md b/docs/docs/pypaimon/cli.md
index 4e44ff7ca0..65f42fb016 100644
--- a/docs/docs/pypaimon/cli.md
+++ b/docs/docs/pypaimon/cli.md
@@ -462,8 +462,14 @@ Output:
```
**Note:** The table must have a full-text index built on the target column.
PyPaimon uses
-the tokenizer settings stored in the index metadata and requires the
`paimon-ftindex`
-package from `paimon-full-text` for full-text reads. See
+the tokenizer settings stored in the index metadata and requires the full-text
extra for
+full-text reads:
+
+```shell
+pip install 'pypaimon[full-text]'
+```
+
+See
[Global Index](../multimodal-table/global-index) for how to create full-text
indexes.
### Table Drop
diff --git
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/JavaPyNativeFullTextE2ETest.java
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/JavaPyNativeFullTextE2ETest.java
index 72c520d33c..7056909d5b 100644
---
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/JavaPyNativeFullTextE2ETest.java
+++
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/JavaPyNativeFullTextE2ETest.java
@@ -51,12 +51,10 @@ import org.apache.paimon.utils.Range;
import
org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.type.TypeReference;
-import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
-import java.io.File;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
@@ -70,7 +68,6 @@ import static
org.apache.paimon.CoreOptions.GLOBAL_INDEX_ENABLED;
import static org.apache.paimon.CoreOptions.PATH;
import static org.apache.paimon.CoreOptions.ROW_TRACKING_ENABLED;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
* Mixed language E2E test for Java native full-text index building and Python
reading.
@@ -79,16 +76,6 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
*/
public class JavaPyNativeFullTextE2ETest {
- @BeforeAll
- public static void checkNativeLibrary() {
- assumeTrue(isNativeAvailable(), "Native full-text library not
available, skipping tests");
- }
-
- private static boolean isNativeAvailable() {
- String path = System.getenv("PAIMON_FTINDEX_JNI_LIB_PATH");
- return path != null && !path.isEmpty() && new File(path).isFile();
- }
-
java.nio.file.Path tempDir =
Paths.get("../paimon-python/pypaimon/tests/e2e").toAbsolutePath();
protected Path warehouse;
diff --git
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
index a3bb98b545..a129aec198 100644
---
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
+++
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativeFullTextGlobalIndexTest.java
@@ -40,7 +40,6 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
-import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
@@ -51,16 +50,10 @@ import java.util.UUID;
import static
org.apache.paimon.shade.guava30.com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
/** Test for {@link NativeFullTextGlobalIndexWriter} and {@link
NativeFullTextGlobalIndexReader}. */
public class NativeFullTextGlobalIndexTest {
- private static boolean isNativeAvailable() {
- String path = System.getenv("PAIMON_FTINDEX_JNI_LIB_PATH");
- return path != null && !path.isEmpty() && new File(path).isFile();
- }
-
@TempDir java.nio.file.Path tempDir;
private FileIO fileIO;
@@ -68,7 +61,6 @@ public class NativeFullTextGlobalIndexTest {
@BeforeEach
public void setup() {
- assumeTrue(isNativeAvailable(), "Native full-text library not
available, skipping tests");
fileIO = new LocalFileIO();
indexPath = new Path(tempDir.toString());
}
diff --git
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativePrimaryKeyFullTextIndexTest.java
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativePrimaryKeyFullTextIndexTest.java
index 85b62c0345..ce1100f590 100644
---
a/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativePrimaryKeyFullTextIndexTest.java
+++
b/paimon-full-text/src/test/java/org/apache/paimon/fulltext/index/NativePrimaryKeyFullTextIndexTest.java
@@ -55,7 +55,6 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
-import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
@@ -67,7 +66,6 @@ import java.util.UUID;
import static
org.apache.paimon.shade.guava30.com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
/** Native SPI tests for file-aligned primary-key full-text archives. */
class NativePrimaryKeyFullTextIndexTest {
@@ -81,7 +79,6 @@ class NativePrimaryKeyFullTextIndexTest {
@BeforeEach
void before() {
- assumeTrue(isNativeAvailable(), "Native full-text library not
available, skipping tests");
fileIO = LocalFileIO.create();
indexPath = new Path(tempDir.toUri());
}
@@ -259,9 +256,4 @@ class NativePrimaryKeyFullTextIndexTest {
private static String matchQuery(String terms) {
return "{\"match\":{\"query\":\"" + terms + "\"}}";
}
-
- private static boolean isNativeAvailable() {
- String path = System.getenv("PAIMON_FTINDEX_JNI_LIB_PATH");
- return path != null && !path.isEmpty() && new File(path).isFile();
- }
}
diff --git a/paimon-python/dev/lint-python.sh b/paimon-python/dev/lint-python.sh
index e9a54c365c..e2e9fff324 100755
--- a/paimon-python/dev/lint-python.sh
+++ b/paimon-python/dev/lint-python.sh
@@ -359,5 +359,10 @@ done
# collect checks according to the options
collect_checks
+
+if python -c "import sys; sys.exit(0 if sys.version_info >= (3, 8) else 1)";
then
+ python -m pip install 'paimon-ftindex==0.1.0' || exit 1
+fi
+
# run checks
-check_stage
\ No newline at end of file
+check_stage
diff --git a/paimon-python/dev/requirements-dev.txt
b/paimon-python/dev/requirements-dev.txt
index c1c4e4eea9..4092c5158e 100644
--- a/paimon-python/dev/requirements-dev.txt
+++ b/paimon-python/dev/requirements-dev.txt
@@ -34,3 +34,5 @@ datafusion>=52; python_version >= "3.10"
lumina-data>=0.1.0
# paimon-vindex vector search (optional, for vindex index tests)
paimon-vindex==0.1.0; python_version >= "3.9"
+# paimon-ftindex full-text search (optional, for full-text index tests)
+paimon-ftindex==0.1.0; python_version >= "3.8"
diff --git a/paimon-python/dev/run_mixed_tests.sh
b/paimon-python/dev/run_mixed_tests.sh
index 26ce94f5b3..082d3340f9 100755
--- a/paimon-python/dev/run_mixed_tests.sh
+++ b/paimon-python/dev/run_mixed_tests.sh
@@ -136,7 +136,7 @@ run_batched_java_write_tests() {
fi
fi
- if [[ "$PYTHON_MINOR" -ge 10 ]]; then
+ if [[ "$PYTHON_MINOR" -ge 8 ]]; then
if ! run_maven_test_batch \
"paimon-full-text Java write tests" \
"paimon-full-text" \
@@ -1287,13 +1287,13 @@ main() {
echo ""
- # Run native full-text index test (requires Python >= 3.10)
- if [[ "$PYTHON_MINOR" -ge 10 ]]; then
+ # Run native full-text index test (requires Python >= 3.8)
+ if [[ "$PYTHON_MINOR" -ge 8 ]]; then
if ! run_native_fulltext_test; then
native_fulltext_result=1
fi
else
- echo -e "${YELLOW}⏭ Skipping Native Full-Text Index Test (requires
Python >= 3.10, current: $PYTHON_VERSION)${NC}"
+ echo -e "${YELLOW}⏭ Skipping Native Full-Text Index Test (requires
Python >= 3.8, current: $PYTHON_VERSION)${NC}"
native_fulltext_result=0
fi
diff --git
a/paimon-python/pypaimon/globalindex/full_text/native_full_text_global_index_reader.py
b/paimon-python/pypaimon/globalindex/full_text/native_full_text_global_index_reader.py
index de0a788b0e..629dee6454 100644
---
a/paimon-python/pypaimon/globalindex/full_text/native_full_text_global_index_reader.py
+++
b/paimon-python/pypaimon/globalindex/full_text/native_full_text_global_index_reader.py
@@ -130,7 +130,14 @@ class NativeFullTextGlobalIndexReader(GlobalIndexReader):
)
stream = self._file_io.new_input_stream(file_path)
try:
- from paimon_ftindex import FullTextIndexReader
+ try:
+ from paimon_ftindex import FullTextIndexReader
+ except ImportError as e:
+ raise ImportError(
+ "paimon-ftindex is required to read full-text indexes.
"
+ "Install paimon-ftindex==0.1.0 or "
+ "pypaimon[full-text]."
+ ) from e
self._native_reader =
FullTextIndexReader(PaimonFullTextInput(stream))
self._searcher = self._native_reader
diff --git
a/paimon-python/pypaimon/globalindex/full_text/native_full_text_index_writer.py
b/paimon-python/pypaimon/globalindex/full_text/native_full_text_index_writer.py
index 343bc5ff59..29374edfcc 100644
---
a/paimon-python/pypaimon/globalindex/full_text/native_full_text_index_writer.py
+++
b/paimon-python/pypaimon/globalindex/full_text/native_full_text_index_writer.py
@@ -120,8 +120,7 @@ class NativeFullTextIndexWriter:
except ImportError as e:
raise ImportError(
"paimon-ftindex is required to build full-text indexes. "
- "Install paimon-full-text's Python package and native FFI "
- "library."
+ "Install paimon-ftindex==0.1.0 or pypaimon[full-text]."
) from e
self._native_writer = FullTextIndexWriter(
diff --git a/paimon-python/pypaimon/table/source/full_text_read.py
b/paimon-python/pypaimon/table/source/full_text_read.py
index d770e96ef7..46372c5edb 100644
--- a/paimon-python/pypaimon/table/source/full_text_read.py
+++ b/paimon-python/pypaimon/table/source/full_text_read.py
@@ -207,8 +207,8 @@ class DataEvolutionFullTextRead(FullTextRead):
except ImportError as e:
raise ImportError(
"paimon-ftindex is required to search uncovered full-text "
- "row ranges. Install paimon-full-text's Python package and "
- "native FFI library."
+ "row ranges. Install paimon-ftindex==0.1.0 or "
+ "pypaimon[full-text]."
) from e
from
pypaimon.globalindex.full_text.native_full_text_global_index_reader import (
diff --git a/paimon-python/setup.py b/paimon-python/setup.py
index 2fa5a3be7d..214d81313c 100644
--- a/paimon-python/setup.py
+++ b/paimon-python/setup.py
@@ -183,6 +183,9 @@ setup(
'vindex': [
'paimon-vindex==0.1.0; python_version>="3.9"',
],
+ 'full-text': [
+ 'paimon-ftindex==0.1.0; python_version>="3.8"',
+ ],
'sql': [
'pypaimon-rust>=0.3.0,<0.4.0; python_version>="3.10"',
'datafusion>=52; python_version>="3.10"',
diff --git a/pom.xml b/pom.xml
index 9465363a39..48a26bb168 100644
--- a/pom.xml
+++ b/pom.xml
@@ -118,7 +118,7 @@ under the License.
<protobuf-java.version>3.19.6</protobuf-java.version>
<roaringbitmap.version>1.2.1</roaringbitmap.version>
<arrow.version>15.0.0</arrow.version>
-
<paimon.full-text-index.version>0.1.0-SNAPSHOT</paimon.full-text-index.version>
+ <paimon.full-text-index.version>0.1.0</paimon.full-text-index.version>
<!-- Can be set to any value to reproduce a specific build. -->
<test.randomization.seed/>