[Bug](materialized-view) fix unmatch mv coz table name (#35444)

fix unmatch mv coz table name
This commit is contained in:
Pxl
2024-05-28 11:29:16 +08:00
committed by yiguolei
parent 97a5f55a37
commit 87c90094a7
3 changed files with 81 additions and 0 deletions

View File

@ -272,6 +272,7 @@ public class CreateMaterializedViewStmt extends DdlStmt {
SelectListItem selectListItem = selectList.getItems().get(i);
Expr selectListItemExpr = selectListItem.getExpr();
selectListItemExpr.setDisableTableName(true);
if (!(selectListItemExpr instanceof SlotRef) && !(selectListItemExpr instanceof FunctionCallExpr)
&& !(selectListItemExpr instanceof ArithmeticExpr)) {
throw new AnalysisException("The materialized view only support the single column or function expr. "