This is an automated email from the ASF dual-hosted git repository.
morrysnow 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 9f97cd029f [Feature] (Nereids) add check to disable unsupported type
(#17196)
9f97cd029f is described below
commit 9f97cd029fd753f0551b056227817fb2b14eff74
Author: mch_ucchi <[email protected]>
AuthorDate: Fri Mar 3 17:57:48 2023 +0800
[Feature] (Nereids) add check to disable unsupported type (#17196)
1. disable decimalv3
2. disable json
3. disable complex type: array, map, struct
4. disable switch: group_by_and_having_use_alias
---
.../doris/nereids/processor/post/Validator.java | 46 ++++++++-
.../nereids/rules/analysis/BindExpression.java | 38 ++++++-
.../org/apache/doris/nereids/types/JsonType.java | 2 +-
.../org/apache/doris/nereids/util/TypeUtils.java | 1 -
.../apache/doris/nereids/UnsupportedTypeTest.java | 114 +++++++++++++++++++++
regression-test/pipeline/p0/conf/fe.conf | 3 +
.../suites/nereids_p0/aggregate/aggregate.groovy | 4 +-
.../test_aggregate_collect.groovy | 10 +-
.../string_functions/test_split_by_string.groovy | 48 ++++-----
.../suites/nereids_syntax_p0/array_function.groovy | 38 +++----
.../test_bitmap_function_nereids.groovy | 16 +--
11 files changed, 256 insertions(+), 64 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/Validator.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/Validator.java
index 3bc32c8c6d..6125fcaad4 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/Validator.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/Validator.java
@@ -19,13 +19,23 @@ package org.apache.doris.nereids.processor.post;
import org.apache.doris.nereids.CascadesContext;
import org.apache.doris.nereids.exceptions.AnalysisException;
+import org.apache.doris.nereids.exceptions.UnboundException;
+import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.Slot;
import org.apache.doris.nereids.trees.expressions.literal.BooleanLiteral;
+import
org.apache.doris.nereids.trees.expressions.visitor.DefaultExpressionVisitor;
import org.apache.doris.nereids.trees.plans.Plan;
import org.apache.doris.nereids.trees.plans.physical.PhysicalFilter;
import org.apache.doris.nereids.trees.plans.physical.PhysicalProject;
+import org.apache.doris.nereids.types.ArrayType;
+import org.apache.doris.nereids.types.DataType;
+import org.apache.doris.nereids.types.DecimalV3Type;
+import org.apache.doris.nereids.types.JsonType;
+import org.apache.doris.nereids.types.MapType;
+import org.apache.doris.nereids.types.StructType;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
import java.util.Collection;
import java.util.Set;
@@ -47,7 +57,7 @@ public class Validator extends PlanPostProcessor {
// Set<Slot> childOutputSet = child.getOutputSet();
child.accept(this, context);
- return project;
+ return visit(project, context);
}
@Override
@@ -72,6 +82,38 @@ public class Validator extends PlanPostProcessor {
}
child.accept(this, context);
- return filter;
+ return visit(filter, context);
+ }
+
+ @Override
+ public Plan visit(Plan plan, CascadesContext context) {
+ plan.getExpressions().forEach(ExpressionChecker.INSTANCE::check);
+ plan.children().forEach(child -> child.accept(this, context));
+ return plan;
+ }
+
+ private static class ExpressionChecker extends
DefaultExpressionVisitor<Expression, Void> {
+ public static final ExpressionChecker INSTANCE = new
ExpressionChecker();
+
+ public void check(Expression expression) {
+ expression.accept(this, null);
+ }
+
+ public Expression visit(Expression expr, Void unused) {
+ try {
+ checkTypes(expr.getDataType());
+ } catch (UnboundException ignored) {
+ return expr;
+ }
+ expr.children().forEach(child -> child.accept(this, null));
+ return expr;
+ }
+
+ private void checkTypes(DataType dataType) {
+ if (ImmutableSet.of(MapType.class, StructType.class,
JsonType.class,
+ ArrayType.class,
DecimalV3Type.class).contains(dataType.getClass())) {
+ throw new AnalysisException(String.format("type %s is
unsupported for Nereids", dataType));
+ }
+ }
}
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java
index 8ceecd86db..6af0d87e3f 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java
@@ -66,6 +66,7 @@ import
org.apache.doris.nereids.trees.plans.logical.LogicalSetOperation;
import org.apache.doris.nereids.trees.plans.logical.LogicalSort;
import org.apache.doris.nereids.trees.plans.logical.LogicalTVFRelation;
import org.apache.doris.nereids.trees.plans.logical.UsingJoin;
+import org.apache.doris.qe.ConnectContext;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
@@ -331,6 +332,7 @@ public class BindExpression implements AnalysisRuleFactory {
groupBy = groupBy.stream()
.map(expr -> bindFunction(expr,
ctx.cascadesContext))
.collect(ImmutableList.toImmutableList());
+ checkIfOutputAliasNameDuplicatedForGroupBy(groupBy,
output);
return agg.withGroupByAndOutput(groupBy, output);
})
),
@@ -376,6 +378,7 @@ public class BindExpression implements AnalysisRuleFactory {
.collect(ImmutableList.toImmutableList()))
.collect(ImmutableList.toImmutableList());
List<NamedExpression> newOutput =
adjustNullableForRepeat(groupingSets, output);
+ groupingSets.forEach(list ->
checkIfOutputAliasNameDuplicatedForGroupBy(list, newOutput));
return repeat.withGroupSetsAndOutput(groupingSets,
newOutput);
})
),
@@ -421,9 +424,9 @@ public class BindExpression implements AnalysisRuleFactory {
})
),
RuleType.BINDING_HAVING_SLOT.build(
- logicalHaving(aggregate()).thenApply(ctx -> {
+ logicalHaving(aggregate()).when(Plan::canBind).thenApply(ctx
-> {
LogicalHaving<Aggregate<Plan>> having = ctx.root;
- Plan childPlan = having.child();
+ Aggregate<Plan> childPlan = having.child();
Set<Expression> boundConjuncts =
having.getConjuncts().stream()
.map(expr -> {
expr = bindSlot(expr, childPlan.children(),
ctx.cascadesContext, false);
@@ -431,6 +434,8 @@ public class BindExpression implements AnalysisRuleFactory {
})
.map(expr -> bindFunction(expr,
ctx.cascadesContext))
.collect(Collectors.toSet());
+
checkIfOutputAliasNameDuplicatedForGroupBy(ImmutableList.copyOf(boundConjuncts),
+ childPlan.getOutputExpressions());
return new LogicalHaving<>(boundConjuncts, having.child());
})
),
@@ -445,6 +450,9 @@ public class BindExpression implements AnalysisRuleFactory {
})
.map(expr -> bindFunction(expr,
ctx.cascadesContext))
.collect(Collectors.toSet());
+
checkIfOutputAliasNameDuplicatedForGroupBy(ImmutableList.copyOf(boundConjuncts),
+
childPlan.getOutput().stream().map(NamedExpression.class::cast)
+ .collect(Collectors.toList()));
return new LogicalHaving<>(boundConjuncts, having.child());
})
),
@@ -668,4 +676,30 @@ public class BindExpression implements AnalysisRuleFactory
{
public boolean canBind(Plan plan) {
return !plan.hasUnboundExpression() || plan.canBind();
}
+
+ private void checkIfOutputAliasNameDuplicatedForGroupBy(List<Expression>
expressions,
+ List<NamedExpression> output) {
+ // if group_by_and_having_use_alias_first=true, we should fall back to
original planner until we
+ // support the session variable.
+ if (output.stream().noneMatch(Alias.class::isInstance)) {
+ return;
+ }
+ List<Alias> aliasList = output.stream().filter(Alias.class::isInstance)
+ .map(Alias.class::cast).collect(Collectors.toList());
+
+ List<NamedExpression> exprAliasList = expressions.stream()
+ .map(expr -> (Set<NamedExpression>)
expr.collect(NamedExpression.class::isInstance))
+ .flatMap(Collection::stream)
+ .collect(Collectors.toList());
+
+ boolean isGroupByContainAlias = exprAliasList.stream().anyMatch(ne ->
+ aliasList.stream().anyMatch(alias ->
!alias.getExprId().equals(ne.getExprId())
+ && alias.getName().equals(ne.getName())));
+
+ if (isGroupByContainAlias
+ && ConnectContext.get() != null
+ &&
ConnectContext.get().getSessionVariable().isGroupByAndHavingUseAliasFirst()) {
+ throw new AnalysisException("group_by_and_having_use_alias=true is
unsupported for Nereids");
+ }
+ }
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/JsonType.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/JsonType.java
index 5e5a15ef06..95a25e03c6 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/JsonType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/JsonType.java
@@ -36,7 +36,7 @@ public class JsonType extends DataType {
@Override
public Type toCatalogDataType() {
- return Type.QUANTILE_STATE;
+ return Type.JSONB;
}
@Override
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeUtils.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeUtils.java
index 9e147d30af..6ec15166eb 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeUtils.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeUtils.java
@@ -33,7 +33,6 @@ import java.util.Optional;
* Judgment expression type.
*/
public class TypeUtils {
-
public static boolean isAddOrSubtract(Expression expr) {
return isAdd(expr) || isSubtract(expr);
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/UnsupportedTypeTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/UnsupportedTypeTest.java
new file mode 100644
index 0000000000..ba6abd2f7b
--- /dev/null
+++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/UnsupportedTypeTest.java
@@ -0,0 +1,114 @@
+// 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.
+
+package org.apache.doris.nereids;
+
+import org.apache.doris.common.Config;
+import org.apache.doris.nereids.exceptions.AnalysisException;
+import org.apache.doris.nereids.parser.NereidsParser;
+import org.apache.doris.nereids.properties.PhysicalProperties;
+import org.apache.doris.nereids.util.MemoTestUtils;
+import org.apache.doris.utframe.TestWithFeService;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class UnsupportedTypeTest extends TestWithFeService {
+ @Override
+ protected void runBeforeAll() throws Exception {
+ Config.enable_map_type = true;
+ Config.enable_struct_type = true;
+ createDatabase("test");
+ connectContext.setDatabase("default_cluster:test");
+ createTables(
+ "create table type_tb (\n"
+ + " id int NOT NULL, \n"
+ + " kjsonb jsonb,\n"
+ + " kdcml decimalv3(15, 2),\n"
+ + " karr array<int>,\n"
+ + " `date` bigint(20) NOT NULL\n"
+ + " )\n"
+ + " DUPLICATE KEY(id) \n"
+ + " distributed by hash(id) buckets 2\n"
+ + " properties (\n"
+ + " \"replication_num\"=\"1\"\n"
+ + " )",
+ "create table type_tb1 (\n"
+ + " id int NOT NULL, \n"
+ + " kmap map<string, string>,\n"
+ + " kstruct struct<a: int, b: int>\n"
+ + " )\n"
+ + " DUPLICATE KEY(id) \n"
+ + " distributed by hash(id) buckets 2\n"
+ + " properties (\n"
+ + " \"replication_num\"=\"1\"\n"
+ + " )");
+ }
+
+ @Test
+ public void testUnsupportedTypeThrowException() {
+ String[] sqls = {
+ "select id from type_tb",
+ "select jsonb_parse('{\"k1\":\"v31\",\"k2\":300}')",
+ "select karr from type_tb",
+ "select array_range(10)",
+ "select kdcml from type_tb",
+ "select cast(0.3 as decimalv3(12, 2))",
+ "select kmap from type_tb1",
+ };
+ Class[] exceptions = {
+ null,
+ AnalysisException.class,
+ AnalysisException.class,
+ AnalysisException.class,
+ AnalysisException.class,
+ AnalysisException.class,
+ AnalysisException.class
+ };
+ runPlanner(sqls[0]);
+ for (int i = 1; i < sqls.length; ++i) {
+ int iCopy = i;
+ Assertions.assertThrows(exceptions[i], () ->
runPlanner(sqls[iCopy]));
+ }
+ }
+
+ @Test
+ public void testGroupByAndHavingUseAliasFirstThrowException() {
+ String[] sqls = {"SELECT\n"
+ + " date_format(date, '%x%v') AS `date`,\n"
+ + " count(date) AS `diff_days`\n"
+ + " FROM type_tb\n"
+ + " GROUP BY date\n"
+ + " HAVING date = 20221111\n"
+ + " ORDER BY date;",
+ "SELECT\n"
+ + " date_format(date, '%x%v') AS `date`,\n"
+ + " count(date) AS `diff_days`\n"
+ + " FROM type_tb\n"
+ + " GROUP BY date\n"
+ + " HAVING date = 20221111\n"
+ + " ORDER BY date;"
+ };
+ runPlanner(sqls[0]);
+ connectContext.getSessionVariable().groupByAndHavingUseAliasFirst =
true;
+ Assertions.assertThrows(AnalysisException.class, () ->
runPlanner(sqls[1]));
+ }
+
+ private void runPlanner(String sql) {
+ new
NereidsPlanner(MemoTestUtils.createStatementContext(connectContext,
sql)).plan(new NereidsParser().parseSingle(sql), PhysicalProperties.ANY);
+ }
+}
diff --git a/regression-test/pipeline/p0/conf/fe.conf
b/regression-test/pipeline/p0/conf/fe.conf
index 538b18bf4b..850a4f78ef 100644
--- a/regression-test/pipeline/p0/conf/fe.conf
+++ b/regression-test/pipeline/p0/conf/fe.conf
@@ -70,3 +70,6 @@ tablet_create_timeout_second=20
remote_fragment_exec_timeout_ms=60000
fuzzy_test_type=p0
use_fuzzy_session_variable=true
+
+enable_map_type=true
+enable_struct_type=true
diff --git a/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
b/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
index 9c8c722db3..71e08f1b58 100644
--- a/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
+++ b/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
@@ -141,8 +141,8 @@ suite("aggregate") {
qt_aggregate """ select variance(c_bigint), variance(distinct c_double)
from ${tableName} """
qt_aggregate """ select 1 k1, 2 k2, c_bigint k3, sum(c_double) from
${tableName} group by 1, k2, k3 order by k1, k2, k3 """
qt_aggregate """ select (k1 + k2) * k3 k4 from (select 1 k1, 2 k2,
c_bigint k3, sum(c_double) from ${tableName} group by 1, k2, k3) t order by k4
"""
- qt_aggregate32" select topn_weighted(c_string,c_bigint,3) from
${tableName}"
- qt_aggregate33" select avg_weighted(c_double,c_bigint) from ${tableName};"
+ // qt_aggregate32" select topn_weighted(c_string,c_bigint,3) from
${tableName}"
+ // qt_aggregate33" select avg_weighted(c_double,c_bigint) from
${tableName};"
// Nereids does't support array function
// qt_aggregate34" select percentile_array(c_bigint,[0.2,0.5,0.9]) from
${tableName};"
qt_aggregate """
diff --git
a/regression-test/suites/nereids_p0/sql_functions/aggregate_functions/test_aggregate_collect.groovy
b/regression-test/suites/nereids_p0/sql_functions/aggregate_functions/test_aggregate_collect.groovy
index 2433c160e6..f112561571 100644
---
a/regression-test/suites/nereids_p0/sql_functions/aggregate_functions/test_aggregate_collect.groovy
+++
b/regression-test/suites/nereids_p0/sql_functions/aggregate_functions/test_aggregate_collect.groovy
@@ -39,15 +39,15 @@ suite("test_aggregate_collect") {
sql "INSERT INTO ${tableName} values(1,'hello','2022-07-04',1.23,'hello'),
(2,NULL,NULL,NULL,'hello')"
sql "INSERT INTO ${tableName} values(1,'hello','2022-07-04',1.23,'hello'),
(2,NULL,NULL,NULL,'hello')"
- qt_select "select
c_int,collect_list(c_string),collect_list(c_date),collect_list(c_decimal) from
${tableName} group by c_int order by c_int"
- qt_select "select
c_int,collect_set(c_string),collect_set(c_date),collect_set(c_decimal) from
${tableName} group by c_int order by c_int"
+ // qt_select "select
c_int,collect_list(c_string),collect_list(c_date),collect_list(c_decimal) from
${tableName} group by c_int order by c_int"
+ // qt_select "select
c_int,collect_set(c_string),collect_set(c_date),collect_set(c_decimal) from
${tableName} group by c_int order by c_int"
// test without GROUP BY
- qt_select "select collect_list(c_string),collect_list(c_string_not_null)
from ${tableName}"
- qt_select "select collect_set(c_string),collect_set(c_string_not_null)
from ${tableName}"
+ // qt_select "select
collect_list(c_string),collect_list(c_string_not_null) from ${tableName}"
+ // qt_select "select collect_set(c_string),collect_set(c_string_not_null)
from ${tableName}"
sql """ CREATE TABLE ${tableCTAS} PROPERTIES("replication_num" = "1") AS
SELECT
1,collect_list(c_int),collect_set(c_string),collect_list(c_date),collect_set(c_decimal),collect_list(c_string_not_null)
FROM ${tableName} """
- qt_select "SELECT * from ${tableCTAS}"
+ // qt_select "SELECT * from ${tableCTAS}"
// topn_array
def tableName_12 = "topn_array"
diff --git
a/regression-test/suites/nereids_p0/sql_functions/string_functions/test_split_by_string.groovy
b/regression-test/suites/nereids_p0/sql_functions/string_functions/test_split_by_string.groovy
index 28ffb8491c..2e5a1ba685 100644
---
a/regression-test/suites/nereids_p0/sql_functions/string_functions/test_split_by_string.groovy
+++
b/regression-test/suites/nereids_p0/sql_functions/string_functions/test_split_by_string.groovy
@@ -20,31 +20,31 @@ suite("test_split_by_string") {
sql "SET enable_vectorized_engine=true"
sql "SET enable_fallback_to_original_planner=false"
// split by char
- qt_sql "select split_by_string('abcde','');"
- qt_sql "select split_by_string('12553','');"
- qt_sql "select split_by_string('','');"
- qt_sql "select split_by_string('',',');"
- qt_sql "select split_by_string('','a');"
+ // qt_sql "select split_by_string('abcde','');"
+ // qt_sql "select split_by_string('12553','');"
+ // qt_sql "select split_by_string('','');"
+ // qt_sql "select split_by_string('',',');"
+ // qt_sql "select split_by_string('','a');"
- qt_sql "select split_by_string('a1b1c1d','1');"
- qt_sql "select split_by_string(',,,',',');"
- qt_sql "select split_by_string('a,b,c,abcde',',');"
- qt_sql "select split_by_string(',,a,b,c,',',');"
- qt_sql "select split_by_string('null',',');"
+ // qt_sql "select split_by_string('a1b1c1d','1');"
+ // qt_sql "select split_by_string(',,,',',');"
+ // qt_sql "select split_by_string('a,b,c,abcde',',');"
+ // qt_sql "select split_by_string(',,a,b,c,',',');"
+ // qt_sql "select split_by_string('null',',');"
- // split by string
- qt_sql "select split_by_string('1,,2,3,,4,5,,abcde', ',,');"
- qt_sql "select split_by_string('abcde','');"
- qt_sql "select split_by_string('','');"
- qt_sql "select split_by_string('',',');"
- qt_sql "select split_by_string('','a');"
+ // // split by string
+ // qt_sql "select split_by_string('1,,2,3,,4,5,,abcde', ',,');"
+ // qt_sql "select split_by_string('abcde','');"
+ // qt_sql "select split_by_string('','');"
+ // qt_sql "select split_by_string('',',');"
+ // qt_sql "select split_by_string('','a');"
- qt_sql "select split_by_string('1,,2,3,,,,,,4,5, abcde', ',,');"
- qt_sql "select split_by_string(',,,,',',,');"
- qt_sql "select split_by_string('a,,b,,c',',,');"
- qt_sql "select split_by_string('a,,b,,c,,',',,');"
- qt_sql "select split_by_string(',,a,,b,,c,,',',,');"
- qt_sql "select split_by_string('null',',');"
+ // qt_sql "select split_by_string('1,,2,3,,,,,,4,5, abcde', ',,');"
+ // qt_sql "select split_by_string(',,,,',',,');"
+ // qt_sql "select split_by_string('a,,b,,c',',,');"
+ // qt_sql "select split_by_string('a,,b,,c,,',',,');"
+ // qt_sql "select split_by_string(',,a,,b,,c,,',',,');"
+ // qt_sql "select split_by_string('null',',');"
def tableName1 = "test_split_by_char"
@@ -74,7 +74,7 @@ suite("test_split_by_string") {
sql """ INSERT INTO ${tableName1} VALUES(10, null, ',') """
sql """ INSERT INTO ${tableName1} VALUES(11, 'a,b,c,12345,', ',') """
- qt_sql "SELECT *, split_by_string(v1, v2) FROM ${tableName1} ORDER BY k1"
+ // qt_sql "SELECT *, split_by_string(v1, v2) FROM ${tableName1} ORDER BY
k1"
def tableName2 = "test_split_by_string"
@@ -104,5 +104,5 @@ suite("test_split_by_string") {
sql """ INSERT INTO ${tableName2} VALUES(10, null, ',') """
- qt_sql "SELECT *, split_by_string(v1, v2) FROM ${tableName2} ORDER BY k1"
+ // qt_sql "SELECT *, split_by_string(v1, v2) FROM ${tableName2} ORDER BY
k1"
}
\ No newline at end of file
diff --git a/regression-test/suites/nereids_syntax_p0/array_function.groovy
b/regression-test/suites/nereids_syntax_p0/array_function.groovy
index 93ed2f1331..bb6e1444d2 100644
--- a/regression-test/suites/nereids_syntax_p0/array_function.groovy
+++ b/regression-test/suites/nereids_syntax_p0/array_function.groovy
@@ -19,25 +19,25 @@ suite("array_function") {
sql "SET enable_nereids_planner=true"
sql "SET enable_fallback_to_original_planner=false"
- test {
- sql "select array(), array(null), array(1), array('abc'), array(null,
1), array(1, null)"
- result([["[]", "[NULL]", "[1]", "['abc']", "[NULL, 1]", "[1, NULL]"]])
- }
+ // test {
+ // sql "select array(), array(null), array(1), array('abc'),
array(null, 1), array(1, null)"
+ // result([["[]", "[NULL]", "[1]", "['abc']", "[NULL, 1]", "[1,
NULL]"]])
+ // }
- test {
- sql "select array(), array('a'), array(number, 'a') from
numbers('number'='3')"
- result([
- ["[]", "['a']", "['0', 'a']"],
- ["[]", "['a']", "['1', 'a']"],
- ["[]", "['a']", "['2', 'a']"]
- ])
- }
+ // test {
+ // sql "select array(), array('a'), array(number, 'a') from
numbers('number'='3')"
+ // result([
+ // ["[]", "['a']", "['0', 'a']"],
+ // ["[]", "['a']", "['1', 'a']"],
+ // ["[]", "['a']", "['2', 'a']"]
+ // ])
+ // }
- test {
- sql """select
- array_min(array(5, 4, 3, 2, 1, null)),
- array_join(array(5, 4, 3, 2, 1, null), ','),
- array_union(array(1, 2, 3), array(4.0, 5.0, 6.1))"""
- result([[1, "5,4,3,2,1", "[1, 2, 3, 4, 5, 6.1]"]])
- }
+ // test {
+ // sql """select
+ // array_min(array(5, 4, 3, 2, 1, null)),
+ // array_join(array(5, 4, 3, 2, 1, null), ','),
+ // array_union(array(1, 2, 3), array(4.0, 5.0, 6.1))"""
+ // result([[1, "5,4,3,2,1", "[1, 2, 3, 4, 5, 6.1]"]])
+ // }
}
diff --git
a/regression-test/suites/nereids_syntax_p0/test_bitmap_function_nereids.groovy
b/regression-test/suites/nereids_syntax_p0/test_bitmap_function_nereids.groovy
index caefcd236c..311b7eba69 100644
---
a/regression-test/suites/nereids_syntax_p0/test_bitmap_function_nereids.groovy
+++
b/regression-test/suites/nereids_syntax_p0/test_bitmap_function_nereids.groovy
@@ -182,12 +182,12 @@ suite("test_bitmap_function_nereids") {
qt_sql """ select orthogonal_bitmap_intersect_count(members, tag_group,
1150000, 1150001, 390006) from ${arthogonalBitmapTable} where tag_group in (
1150000, 1150001, 390006); """
qt_sql """ select orthogonal_bitmap_union_count(members) from
${arthogonalBitmapTable} where tag_group in ( 1150000, 1150001, 390006); """
- qt_sql """ select bitmap_to_array(user_id) from ${intersectCountTable}
order by dt desc; """
- qt_sql """ select bitmap_to_array(bitmap_empty()); """
- qt_sql """ select bitmap_to_array(bitmap_from_string('100,200,3,4')); """
-
- qt_sql """ select
bitmap_to_string(sub_bitmap(bitmap_from_string('1,2,3,4,5'), 0, 3)) value; """
- qt_sql """ select bitmap_to_string(sub_bitmap(bitmap_from_string('1'), 0,
3)) value; """
- qt_sql """ select
bitmap_to_string(bitmap_subset_limit(bitmap_from_string('100'), 0, 3)) value;
"""
- qt_sql """ select
bitmap_to_string(bitmap_subset_in_range(bitmap_from_string('20221103'), 0,
20221104)) date_list_bitmap; """
+ // qt_sql """ select bitmap_to_array(user_id) from ${intersectCountTable}
order by dt desc; """
+ // qt_sql """ select bitmap_to_array(bitmap_empty()); """
+ // qt_sql """ select bitmap_to_array(bitmap_from_string('100,200,3,4'));
"""
+
+ // qt_sql """ select
bitmap_to_string(sub_bitmap(bitmap_from_string('1,2,3,4,5'), 0, 3)) value; """
+ // qt_sql """ select bitmap_to_string(sub_bitmap(bitmap_from_string('1'),
0, 3)) value; """
+ // qt_sql """ select
bitmap_to_string(bitmap_subset_limit(bitmap_from_string('100'), 0, 3)) value;
"""
+ // qt_sql """ select
bitmap_to_string(bitmap_subset_in_range(bitmap_from_string('20221103'), 0,
20221104)) date_list_bitmap; """
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]