Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions api/src/main/java/org/apache/iceberg/transforms/Transforms.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,30 +242,30 @@ public static <T> Transform<T, Integer> year() {
}

/**
* Returns a year {@link Transform} for date or timestamp types.
* Returns a month {@link Transform} for date or timestamp types.
*
* @param <T> Java type passed to this transform
* @return a year transform
* @return a month transform
*/
public static <T> Transform<T, Integer> 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 <T> Java type passed to this transform
* @return a year transform
* @return a day transform
*/
public static <T> Transform<T, Integer> 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 <T> Java type passed to this transform
* @return a year transform
* @return an hour transform
*/
public static <T> Transform<T, Integer> hour() {
return Hours.get();
Expand Down
2 changes: 1 addition & 1 deletion format/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |

Expand Down