Fokko commented on code in PR #8192:
URL: https://github.com/apache/iceberg/pull/8192#discussion_r1280742773
##########
format/spec.md:
##########
@@ -309,10 +309,10 @@ Partition specs capture the transform from table data to
partition values. This
| **`identity`** | Source value, unmodified
| Any
| Source type |
| **`bucket[N]`** | Hash of value, mod `N` (see below)
| `int`, `long`, `decimal`, `date`, `time`, `timestamp`, `timestamptz`,
`string`, `uuid`, `fixed`, `binary` | `int` |
| **`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`
| `int` |
-| **`hour`** | Extract a timestamp hour, as hours from 1970-01-01
00:00:00 | `timestamp`, `timestamptz`
| `int` |
+| **`years`** | Extract a date or timestamp year, as years from 1970
| `date`, `timestamp`, `timestamptz`
| `int` |
Review Comment:
> I can add some tests as well if you think that would be useful.
You can add a test in `TestAlterTablePartitionFields` to make sure that we
don't break this in the future. It could be something similar as
`testSparkTableAddDropPartitions` where you use the singular transform names.
> Also, should I change the prefix of this PR to Spark: ?
Yes please :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]