Skip to content

Commit

Permalink
API: Fix Transforms javadoc (apache#5980)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhiwen1255 authored Oct 14, 2022
1 parent 876e718 commit 336d18a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit 336d18a

Please sign in to comment.