revert [improvement](mv) Support to use cast when create sync materialized view #38008 (#39378)

## Proposed changes

this is brought by https://github.com/apache/doris/pull/38008
if use cast(FLOOR(MINUTE(time) / 15) as decimal(9, 0)) in group by
clause when sync materialized view. if downgrade from 2.1.6 to 2.1.5 or
upgrade 2.1.6 to 3.0.0
this may cause fe can not run. So revert the function.
This commit is contained in:
seawinde
2024-08-15 14:16:57 +08:00
committed by GitHub
parent a44a274563
commit aebc70d75a
3 changed files with 2 additions and 144 deletions

View File

@ -273,9 +273,8 @@ public class CreateMaterializedViewStmt extends DdlStmt {
Expr selectListItemExpr = selectListItem.getExpr();
selectListItemExpr.setDisableTableName(true);
Expr realItem = selectListItemExpr.unwrapExpr(false);
if (!(realItem instanceof SlotRef) && !(realItem instanceof FunctionCallExpr)
&& !(realItem instanceof ArithmeticExpr)) {
if (!(selectListItemExpr instanceof SlotRef) && !(selectListItemExpr instanceof FunctionCallExpr)
&& !(selectListItemExpr instanceof ArithmeticExpr)) {
throw new AnalysisException("The materialized view only support the single column or function expr. "
+ "Error column: " + selectListItemExpr.toSql());
}