This is an automated email from the ASF dual-hosted git repository.
airborne 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 a6b8a94ad88 [Improve](config)del array config for create inverted
index (#39006)
a6b8a94ad88 is described below
commit a6b8a94ad886525673997b616798b7c88dda97f0
Author: amory <[email protected]>
AuthorDate: Thu Aug 8 17:43:40 2024 +0800
[Improve](config)del array config for create inverted index (#39006)
## Proposed changes
delete useless config : enable_create_inverted_index_for_array
---
.../main/java/org/apache/doris/common/Config.java | 3 ---
.../java/org/apache/doris/analysis/IndexDef.java | 4 ---
.../trees/plans/commands/info/IndexDefinition.java | 4 ---
.../test_array_contains_with_inverted_index.groovy | 1 -
.../inverted_index_p0/test_array_index.groovy | 30 ----------------------
.../test_array_with_inverted_index_all_type.groovy | 1 -
.../mysql_fulltext_array_contains/load.groovy | 1 -
7 files changed, 44 deletions(-)
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 c8db6482428..e75eb95ec0b 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
@@ -2837,9 +2837,6 @@ public class Config extends ConfigBase {
@ConfField(mutable = true, masterOnly = true)
public static boolean enable_create_bitmap_index_as_inverted_index = true;
- @ConfField(mutable = true)
- public static boolean enable_create_inverted_index_for_array = false;
-
// The original meta read lock is not enough to keep a snapshot of
partition versions,
// so the execution of `createScanRangeLocations` are delayed to
`Coordinator::exec`,
// to help to acquire a snapshot of partition versions.
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/IndexDef.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/IndexDef.java
index 386a244c934..7db8c460b2f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/IndexDef.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/IndexDef.java
@@ -22,7 +22,6 @@ import org.apache.doris.catalog.Column;
import org.apache.doris.catalog.KeysType;
import org.apache.doris.catalog.PrimitiveType;
import org.apache.doris.common.AnalysisException;
-import org.apache.doris.common.Config;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
@@ -238,9 +237,6 @@ public class IndexDef {
}
if (indexType == IndexType.INVERTED) {
- if (!Config.enable_create_inverted_index_for_array &&
colType.isArrayType()) {
- throw new AnalysisException("inverted index does not
support array type column:" + indexColName);
- }
InvertedIndexUtil.checkInvertedIndexParser(indexColName,
colType, properties);
} else if (indexType == IndexType.NGRAM_BF) {
if (colType != PrimitiveType.CHAR && colType !=
PrimitiveType.VARCHAR
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/IndexDefinition.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/IndexDefinition.java
index 79b781d2527..bd37616ea2d 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/IndexDefinition.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/IndexDefinition.java
@@ -23,7 +23,6 @@ import org.apache.doris.analysis.InvertedIndexUtil;
import org.apache.doris.catalog.Env;
import org.apache.doris.catalog.Index;
import org.apache.doris.catalog.KeysType;
-import org.apache.doris.common.Config;
import org.apache.doris.nereids.exceptions.AnalysisException;
import org.apache.doris.nereids.types.ArrayType;
import org.apache.doris.nereids.types.DataType;
@@ -124,9 +123,6 @@ public class IndexDefinition {
}
if (indexType == IndexType.INVERTED) {
- if (!Config.enable_create_inverted_index_for_array &&
colType.isArrayType()) {
- throw new AnalysisException("inverted index does not
support array type column: " + indexColName);
- }
try {
InvertedIndexUtil.checkInvertedIndexParser(indexColName,
colType.toCatalogDataType().getPrimitiveType(),
properties);
diff --git
a/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy
b/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy
index a401aee1e50..0ea18c784d6 100644
---
a/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy
+++
b/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy
@@ -18,7 +18,6 @@
suite("test_array_contains_with_inverted_index"){
// prepare test table
def indexTblName = "tai"
- sql """ ADMIN SET FRONTEND CONFIG
("enable_create_inverted_index_for_array" = "true"); """
// If we use common expr pass to inverted index , we should set
enable_common_expr_pushdown = true
sql """ set enable_common_expr_pushdown = true; """
diff --git a/regression-test/suites/inverted_index_p0/test_array_index.groovy
b/regression-test/suites/inverted_index_p0/test_array_index.groovy
index 38dee1c0952..7d10784b420 100644
--- a/regression-test/suites/inverted_index_p0/test_array_index.groovy
+++ b/regression-test/suites/inverted_index_p0/test_array_index.groovy
@@ -15,33 +15,6 @@
// specific language governing permissions and limitations
// under the License.
-suite("test_array_index0"){
- // create without set config 'enable_create_inverted_index_for_array' =
'true'
- try {
- sql """
- CREATE TABLE `disable_create_inverted_idx_on_array` (
- `apply_date` date NULL COMMENT '',
- `id` varchar(60) NOT NULL COMMENT '',
- `inventors` array<text> NULL COMMENT '',
- INDEX index_inverted_inventors(inventors) USING INVERTED COMMENT ''
- ) ENGINE=OLAP
- DUPLICATE KEY(`apply_date`, `id`)
- COMMENT 'OLAP'
- DISTRIBUTED BY HASH(`id`) BUCKETS 1
- PROPERTIES (
- "replication_allocation" = "tag.location.default: 1",
- "is_being_synced" = "false",
- "storage_format" = "V2",
- "light_schema_change" = "true",
- "disable_auto_compaction" = "false",
- "enable_single_replica_compaction" = "false"
- );
- """
- } catch (Exception e) {
- assertTrue(e.getMessage().contains("inverted index does not support
array type column"))
- }
-}
-
suite("test_array_index1"){
// prepare test table
@@ -50,8 +23,6 @@ suite("test_array_index1"){
def alter_res = "null"
def useTime = 0
- sql """ ADMIN SET FRONTEND CONFIG
("enable_create_inverted_index_for_array" = "true"); """
-
def wait_for_latest_op_on_table_finish = { table_name, OpTimeout ->
for(int t = delta_time; t <= OpTimeout; t += delta_time){
alter_res = sql """SHOW ALTER TABLE COLUMN WHERE TableName =
"${table_name}" ORDER BY CreateTime DESC LIMIT 1;"""
@@ -124,7 +95,6 @@ suite("test_array_index2"){
def useTime = 0
def indexTblName = "test_array_index2"
- sql """ ADMIN SET FRONTEND CONFIG
("enable_create_inverted_index_for_array" = "true"); """
sql "DROP TABLE IF EXISTS ${indexTblName}"
// create 1 replica table
diff --git
a/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy
b/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy
index 05f0eb2176a..b895b97fe8e 100644
---
a/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy
+++
b/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy
@@ -16,7 +16,6 @@
// under the License.
suite("test_array_with_inverted_index_all_type"){
- sql """ ADMIN SET FRONTEND CONFIG
("enable_create_inverted_index_for_array" = "true"); """
// 1. mor|dup|mow
// 2. index with english or standard parser (only string | variant type
support english parser now)
// 3. all types
diff --git a/regression-test/suites/mysql_fulltext_array_contains/load.groovy
b/regression-test/suites/mysql_fulltext_array_contains/load.groovy
index 2ae48798243..4e94553259b 100644
--- a/regression-test/suites/mysql_fulltext_array_contains/load.groovy
+++ b/regression-test/suites/mysql_fulltext_array_contains/load.groovy
@@ -16,7 +16,6 @@
// under the License.
suite("load") {
- sql """ ADMIN SET FRONTEND CONFIG
("enable_create_inverted_index_for_array" = "true"); """
def test_basic_tables=["articles_uk_array", "articles_dk_array"]
def test_fulltext_tables=["fulltext_t1_uk_array", "fulltext_t1_dk_array"]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]