diff --git a/api/src/main/java/org/apache/iceberg/transforms/Transforms.java b/api/src/main/java/org/apache/iceberg/transforms/Transforms.java index 0a0c70b74604..9f23e742ec57 100644 --- a/api/src/main/java/org/apache/iceberg/transforms/Transforms.java +++ b/api/src/main/java/org/apache/iceberg/transforms/Transforms.java @@ -242,30 +242,30 @@ public static Transform year() { } /** - * Returns a year {@link Transform} for date or timestamp types. + * Returns a month {@link Transform} for date or timestamp types. * * @param Java type passed to this transform - * @return a year transform + * @return a month transform */ public static Transform month() { return Months.get(); } /** - * Returns a year {@link Transform} for date or timestamp types. + * Returns a day {@link Transform} for date or timestamp types. * * @param Java type passed to this transform - * @return a year transform + * @return a day transform */ public static Transform day() { return Days.get(); } /** - * Returns a year {@link Transform} for date or timestamp types. + * Returns an hour {@link Transform} for date or timestamp types. * * @param Java type passed to this transform - * @return a year transform + * @return an hour transform */ public static Transform hour() { return Hours.get(); diff --git a/format/spec.md b/format/spec.md index c8bcf52e3bb6..96b335ffbb76 100644 --- a/format/spec.md +++ b/format/spec.md @@ -311,7 +311,7 @@ Partition specs capture the transform from table data to partition values. This | **`truncate[W]`** | Value truncated to width `W` (see below) | `int`, `long`, `decimal`, `string` | Source type | | **`year`** | Extract a date or timestamp year, as years from 1970 | `date`, `timestamp`, `timestamptz` | `int` | | **`month`** | Extract a date or timestamp month, as months from 1970-01-01 | `date`, `timestamp`, `timestamptz` | `int` | -| **`day`** | Extract a date or timestamp day, as days from 1970-01-01 | `date`, `timestamp`, `timestamptz` | `date` | +| **`day`** | Extract a date or timestamp day, as days from 1970-01-01 | `date`, `timestamp`, `timestamptz` | `int` | | **`hour`** | Extract a timestamp hour, as hours from 1970-01-01 00:00:00 | `timestamp`, `timestamptz` | `int` | | **`void`** | Always produces `null` | Any | Source type or `int` |