Skip to content

Commit

Permalink
revert [improvement](mv) Support to use cast when create sync materia…
Browse files Browse the repository at this point in the history
…lized view #38008 (#39378)

## Proposed changes

this is brought by #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.
  • Loading branch information
seawinde authored Aug 15, 2024
1 parent a44a274 commit aebc70d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ public void analyzeSelectClause(Analyzer analyzer) throws AnalysisException {

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());
}
Expand Down
11 changes: 0 additions & 11 deletions regression-test/data/mv_p0/contain_cast/mv_contains_cast.out

This file was deleted.

130 changes: 0 additions & 130 deletions regression-test/suites/mv_p0/contain_cast/mv_contains_cast.groovy

This file was deleted.

0 comments on commit aebc70d

Please sign in to comment.