This is an automated email from the ASF dual-hosted git repository.
eldenmoon 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 70ac9f7b1b1 [fix](inverted index) support dict_compression
configuration for variant type (#56399)
70ac9f7b1b1 is described below
commit 70ac9f7b1b10eeebc73071cc0813cb1737b8cf86
Author: zzzxl <[email protected]>
AuthorDate: Thu Sep 25 13:39:07 2025 +0800
[fix](inverted index) support dict_compression configuration for variant
type (#56399)
---
.../apache/doris/analysis/InvertedIndexUtil.java | 2 +-
.../test_inverted_index_v3.groovy | 28 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/InvertedIndexUtil.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/InvertedIndexUtil.java
index f1e73c75ca8..1f723647784 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/InvertedIndexUtil.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/InvertedIndexUtil.java
@@ -316,7 +316,7 @@ public class InvertedIndexUtil {
}
if (dictCompression != null) {
- if (!colType.isStringType()) {
+ if (!colType.isStringType() && !colType.isVariantType()) {
throw new AnalysisException("dict_compression can only be set
for StringType columns. type: "
+ colType);
}
diff --git
a/regression-test/suites/inverted_index_p0/test_inverted_index_v3.groovy
b/regression-test/suites/inverted_index_p0/test_inverted_index_v3.groovy
index 82389d84e3c..6ee92c4083b 100644
--- a/regression-test/suites/inverted_index_p0/test_inverted_index_v3.groovy
+++ b/regression-test/suites/inverted_index_p0/test_inverted_index_v3.groovy
@@ -140,4 +140,32 @@ suite("test_inverted_index_v3", "p0"){
} finally {
}
+
+ sql """
+ CREATE TABLE `t1` (
+ `id` int NOT NULL,
+ `v` variant<MATCH_NAME_GLOB
'key':text,properties("variant_max_subcolumns_count" = "3")> ,
+ INDEX idx_v (`v`) USING INVERTED PROPERTIES("dict_compression" =
"true", "lower_case" = "true", "parser" = "unicode", "support_phrase" = "true",
"field_pattern" = "key")
+ ) ENGINE=OLAP
+ DUPLICATE KEY(`id`)
+ DISTRIBUTED BY HASH(`id`) BUCKETS 1
+ PROPERTIES (
+ "replication_allocation" = "tag.location.default: 1",
+ "inverted_index_storage_format" = "V3"
+ );
+ """
+
+ sql """
+ CREATE TABLE `t2` (
+ `id` int NOT NULL,
+ `v` variant,
+ INDEX idx_v (`v`) USING INVERTED PROPERTIES("dict_compression" =
"true", "lower_case" = "true", "parser" = "unicode", "support_phrase" = "true")
+ ) ENGINE=OLAP
+ DUPLICATE KEY(`id`)
+ DISTRIBUTED BY HASH(`id`) BUCKETS 1
+ PROPERTIES (
+ "replication_allocation" = "tag.location.default: 1",
+ "inverted_index_storage_format" = "V3"
+ );
+ """
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]