This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 98e039ae319 [pick](Variant) truncate key when column is variant type when crea… (#40238) 98e039ae319 is described below commit 98e039ae319043d7d1c493aa5b82678d3b324573 Author: lihangyu <15605149...@163.com> AuthorDate: Mon Sep 2 13:54:04 2024 +0800 [pick](Variant) truncate key when column is variant type when crea… (#40238) #39988 --- .../nereids/trees/plans/commands/info/CreateMTMVInfo.java | 2 +- regression-test/suites/variant_p0/mtmv.groovy | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateMTMVInfo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateMTMVInfo.java index cb99a853906..d4dc0b95a17 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateMTMVInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateMTMVInfo.java @@ -265,7 +265,7 @@ public class CreateMTMVInfo { if (type.isFloatLikeType() || type.isStringType() || type.isJsonType() || catalogType.isComplexType() || type.isBitmapType() || type.isHllType() || type.isQuantileStateType() || type.isJsonType() || type.isStructType() - || column.getAggType() != null) { + || column.getAggType() != null || type.isVariantType()) { break; } keys.add(column.getName()); diff --git a/regression-test/suites/variant_p0/mtmv.groovy b/regression-test/suites/variant_p0/mtmv.groovy index 616316ad00f..5d26c8fcf56 100644 --- a/regression-test/suites/variant_p0/mtmv.groovy +++ b/regression-test/suites/variant_p0/mtmv.groovy @@ -92,4 +92,16 @@ suite("regression_test_variant_mtmv"){ """ def job_name_2 = getJobName(db, "mv2") waitingMTMVTaskFinished(job_name_2) + + sql """DROP TABLE IF EXISTS tbl1""" + sql """ + CREATE TABLE tbl1 ( pk int, var VARIANT NULL ) engine=olap DUPLICATE KEY(pk) distributed by hash(pk) buckets 10 properties("replication_num" += "1"); + """ + sql """insert into tbl1 values (1, '{"a":1}')""" + sql """DROP MATERIALIZED VIEW IF EXISTS tbl1_mv""" + sql """ + CREATE MATERIALIZED VIEW tbl1_mv BUILD IMMEDIATE REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 10 PROPERTIES +('replication_num' = '1') AS SELECT * FROM tbl1; + """ } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org