This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new a8774d28fa4 [chore](index) add config
enable_create_bitmap_index_as_inverted_index default true #33434 (#35528)
a8774d28fa4 is described below
commit a8774d28fa444c2dd5dab10f3dc1f5d8380d4c50
Author: Kang <[email protected]>
AuthorDate: Tue May 28 23:31:05 2024 +0800
[chore](index) add config enable_create_bitmap_index_as_inverted_index
default true #33434 (#35528)
---
fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 2 ++
fe/fe-core/src/main/cup/sql_parser.cup | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
index 6e4c2c07931..8e5d1b73f1b 100644
--- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
+++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java
@@ -2375,4 +2375,6 @@ public class Config extends ConfigBase {
"Stream_Load When importing, the maximum length of label is
limited"})
public static int label_regex_length = 128;
+ @ConfField(mutable = true, masterOnly = true)
+ public static boolean enable_create_bitmap_index_as_inverted_index = true;
}
diff --git a/fe/fe-core/src/main/cup/sql_parser.cup
b/fe/fe-core/src/main/cup/sql_parser.cup
index a27d896c3ed..5da2e9dc8cc 100644
--- a/fe/fe-core/src/main/cup/sql_parser.cup
+++ b/fe/fe-core/src/main/cup/sql_parser.cup
@@ -48,6 +48,7 @@ import org.apache.doris.catalog.StructType;
import org.apache.doris.catalog.TableIf.TableType;
import org.apache.doris.catalog.View;
import org.apache.doris.common.AnalysisException;
+import org.apache.doris.common.Config;
import org.apache.doris.common.FeConstants;
import org.apache.doris.common.Version;
import org.apache.doris.mysql.MysqlPassword;
@@ -3669,7 +3670,11 @@ opt_index_type ::=
:}
| KW_USING KW_BITMAP
{:
- RESULT = IndexDef.IndexType.BITMAP;
+ if (Config.enable_create_bitmap_index_as_inverted_index) {
+ RESULT = IndexDef.IndexType.INVERTED;
+ } else {
+ RESULT = IndexDef.IndexType.BITMAP;
+ }
:}
| KW_USING KW_NGRAM_BF
{:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]