[bugfix](jsonb) Fix create mv using jsonb key cause be crash (#17430)
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
||||
@ -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))
|
||||
|
||||
Reference in New Issue
Block a user