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

yangsiyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 8870e8ffaeb [fix](inverted index) fix incorrect supported types output 
in tokenizer error message (#59666)
8870e8ffaeb is described below

commit 8870e8ffaebaefd008c26941564911d5b7e00451
Author: zzzxl <[email protected]>
AuthorDate: Wed Jan 14 14:44:34 2026 +0800

    [fix](inverted index) fix incorrect supported types output in tokenizer 
error message (#59666)
---
 .../apache/doris/indexpolicy/IndexPolicyMgr.java   |  2 +-
 ...test_index_policy_unsupported_type_error.groovy | 42 ++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/indexpolicy/IndexPolicyMgr.java 
b/fe/fe-core/src/main/java/org/apache/doris/indexpolicy/IndexPolicyMgr.java
index b6c16668f8c..d6c9f127047 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/indexpolicy/IndexPolicyMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/indexpolicy/IndexPolicyMgr.java
@@ -327,7 +327,7 @@ public class IndexPolicyMgr implements Writable, 
GsonPostProcessable {
                 validator = new PinyinTokenizerValidator();
                 break;
             default:
-                Set<String> userFacingTypes = 
IndexPolicy.BUILTIN_TOKEN_FILTERS.stream()
+                Set<String> userFacingTypes = 
IndexPolicy.BUILTIN_TOKENIZERS.stream()
                         .filter(t -> !t.equals("empty"))
                         .collect(Collectors.toSet());
                 throw new DdlException("Unsupported tokenizer type: " + type
diff --git 
a/regression-test/suites/inverted_index_p0/test_index_policy_unsupported_type_error.groovy
 
b/regression-test/suites/inverted_index_p0/test_index_policy_unsupported_type_error.groovy
new file mode 100644
index 00000000000..a5fe01f6a65
--- /dev/null
+++ 
b/regression-test/suites/inverted_index_p0/test_index_policy_unsupported_type_error.groovy
@@ -0,0 +1,42 @@
+// 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.
+
+suite("test_index_policy_unsupported_type_error") {
+    test {
+        sql """
+            CREATE INVERTED INDEX TOKENIZER test_invalid_tokenizer
+            PROPERTIES("type" = "invalid_type_xyz")
+        """
+        exception "Unsupported tokenizer type: invalid_type_xyz"
+    }
+
+    test {
+        sql """
+            CREATE INVERTED INDEX TOKEN_FILTER test_invalid_token_filter
+            PROPERTIES("type" = "invalid_filter_type")
+        """
+        exception "Unsupported token filter type: invalid_filter_type"
+    }
+
+    test {
+        sql """
+            CREATE INVERTED INDEX CHAR_FILTER test_invalid_char_filter
+            PROPERTIES("type" = "invalid_char_filter_type")
+        """
+        exception "Unsupported char filter type: invalid_char_filter_type"
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to