This is an automated email from the ASF dual-hosted git repository.
szehon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 336d18acdb API: Fix Transforms javadoc (#5980)
336d18acdb is described below
commit 336d18acdb7dc0e783861151e2e871524cef9f6d
Author: xzw_deepnova <[email protected]>
AuthorDate: Sat Oct 15 07:33:12 2022 +0800
API: Fix Transforms javadoc (#5980)
---
.../main/java/org/apache/iceberg/transforms/Transforms.java | 12 ++++++------
format/spec.md | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
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 0a0c70b746..9f23e742ec 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 class Transforms {
}
/**
- * 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();
diff --git a/format/spec.md b/format/spec.md
index c8bcf52e3b..96b335ffbb 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` |