pick from master #39286
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", "hour");
|
||||
private static Set<String> timeUnits = ImmutableSet.of("year", "quarter", "week", "month", "day", "hour");
|
||||
private String timeUnit;
|
||||
|
||||
public MTMVPartitionExprDateTrunc(FunctionCallExpr functionCallExpr) throws AnalysisException {
|
||||
@ -198,9 +198,15 @@ public class MTMVPartitionExprDateTrunc implements MTMVPartitionExprService {
|
||||
case "year":
|
||||
result = value.plusYears(1L);
|
||||
break;
|
||||
case "quarter":
|
||||
result = value.plusMonths(3L);
|
||||
break;
|
||||
case "month":
|
||||
result = value.plusMonths(1L);
|
||||
break;
|
||||
case "week":
|
||||
result = value.plusWeeks(1L);
|
||||
break;
|
||||
case "day":
|
||||
result = value.plusDays(1L);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user