pick: https://github.com/apache/doris/pull/37678
This commit is contained in:
@ -47,7 +47,7 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
public class MTMVPartitionExprDateTrunc implements MTMVPartitionExprService {
|
||||
private static Set<String> timeUnits = ImmutableSet.of("year", "month", "day");
|
||||
private static Set<String> timeUnits = ImmutableSet.of("year", "month", "day", "hour");
|
||||
private String timeUnit;
|
||||
|
||||
public MTMVPartitionExprDateTrunc(FunctionCallExpr functionCallExpr) throws AnalysisException {
|
||||
@ -202,6 +202,9 @@ public class MTMVPartitionExprDateTrunc implements MTMVPartitionExprService {
|
||||
case "day":
|
||||
result = value.plusDays(1L);
|
||||
break;
|
||||
case "hour":
|
||||
result = value.plusHours(1L);
|
||||
break;
|
||||
default:
|
||||
throw new AnalysisException(
|
||||
"async materialized view partition roll up not support timeUnit: " + timeUnit);
|
||||
|
||||
Reference in New Issue
Block a user