[bugfix](jsonb) Fix create mv using jsonb key cause be crash (#17430)

This commit is contained in:
Kang
2023-03-08 14:18:26 +08:00
committed by GitHub
parent f3b50b3472
commit 626fbc34f9
5 changed files with 241 additions and 5 deletions

View File

@ -560,7 +560,7 @@ public class MaterializedViewHandler extends AlterHandler {
}
// if the column is complex type, we forbid to create materialized view
for (Column column : newMVColumns) {
if (column.getDataType().isComplexType()) {
if (column.getDataType().isComplexType() || column.getDataType().isJsonbType()) {
throw new DdlException("The " + column.getDataType() + " column[" + column + "] not support "
+ "to create materialized view");
}

View File

@ -65,7 +65,7 @@ public class CheckExpressionLegalityTest implements MemoPatternMatchSupported {
));
ExceptionChecker.expectThrowsWithMsg(AnalysisException.class,
"Doris hll, bitmap, array, map, struct column must use with specific function", () ->
"column must use with specific function", () ->
PlanChecker.from(connectContext)
.analyze("select count(distinct id) from (select to_bitmap(1) id) tbl")
.applyBottomUp(new ExpressionRewrite(CheckLegalityAfterRewrite.INSTANCE))