diff --git a/core/src/main/java/org/apache/calcite/avatica/util/TimeUnit.java b/core/src/main/java/org/apache/calcite/avatica/util/TimeUnit.java index b81d707f00..cfbe46c713 100644 --- a/core/src/main/java/org/apache/calcite/avatica/util/TimeUnit.java +++ b/core/src/main/java/org/apache/calcite/avatica/util/TimeUnit.java @@ -25,7 +25,7 @@ * {@link #HOUR}, {@link #MINUTE}, {@link #SECOND} can be the unit of a SQL * interval. * - *

The others ({@link #QUARTER}, {@link #WEEK}, {@link #MILLISECOND}, + *

The others ({@link #QUARTER}, {@link #WEEK}, {@link #ISOWEEK}, {@link #MILLISECOND}, * {@link #DOW}, {@link #DOY}, {@link #EPOCH}, {@link #DECADE}, {@link #CENTURY}, * {@link #MILLENNIUM}, {@link #MICROSECOND}, {@link #NANOSECOND}, {@link #ISODOW} * and {@link #ISOYEAR}) are convenient to use internally, @@ -48,6 +48,8 @@ public enum TimeUnit { ISOYEAR(true, ' ', BigDecimal.valueOf(12) /* months */, null), WEEK(false, '*', BigDecimal.valueOf(DateTimeUtils.MILLIS_PER_DAY * 7), BigDecimal.valueOf(53)), + ISOWEEK(false, '*', BigDecimal.valueOf(DateTimeUtils.MILLIS_PER_DAY * 7), + BigDecimal.valueOf(53)), MILLISECOND(false, '.', BigDecimal.ONE, BigDecimal.valueOf(1000)), MICROSECOND(false, '.', BigDecimal.ONE.scaleByPowerOfTen(-3), BigDecimal.valueOf(1000_000)), diff --git a/core/src/main/java/org/apache/calcite/avatica/util/TimeUnitRange.java b/core/src/main/java/org/apache/calcite/avatica/util/TimeUnitRange.java index 8710692258..eabe6a604a 100644 --- a/core/src/main/java/org/apache/calcite/avatica/util/TimeUnitRange.java +++ b/core/src/main/java/org/apache/calcite/avatica/util/TimeUnitRange.java @@ -42,6 +42,7 @@ public enum TimeUnitRange { ISOYEAR(TimeUnit.ISOYEAR, null), QUARTER(TimeUnit.QUARTER, null), WEEK(TimeUnit.WEEK, null), + ISOWEEK(TimeUnit.ISOWEEK, null), MILLISECOND(TimeUnit.MILLISECOND, null), MICROSECOND(TimeUnit.MICROSECOND, null), NANOSECOND(TimeUnit.NANOSECOND, null),