This is an automated email from the ASF dual-hosted git repository.
stevenzwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new 0ff724da9d Spec: List identity and bucket source types explicitly
(#18545)
0ff724da9d is described below
commit 0ff724da9d835b11de2a472e80ddc45245c4010d
Author: Steven Zhen Wu <[email protected]>
AuthorDate: Fri Nov 20 22:15:57 2026 -0800
Spec: List identity and bucket source types explicitly (#18545)
New primitive types should not silently become identity sources, and the
expressions spec must use the same source-type lists as the table spec.
---
format/expressions-spec.md | 4 ++--
format/spec.md | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/format/expressions-spec.md b/format/expressions-spec.md
index 924c2c796a..584a55242b 100644
--- a/format/expressions-spec.md
+++ b/format/expressions-spec.md
@@ -210,7 +210,7 @@ All partition transforms produce `null` for a `null` input
value.
| Function name | Description
| Source types |
Result type |
|-------------------|--------------------------------------------------------------|----------------------------------------------------------------------|-------------|
-| `identity(value)` | Source value, unmodified
| Any primitive except for `geometry` and `geography` | Source type |
+| `identity(value)` | Source value, unmodified
| `unknown`, `boolean`, `int`, `long`, `float`, `double`, `decimal`,
`date`, `time`, `timestamp`, `timestamptz`, `timestamp_ns`, `timestamptz_ns`,
`string`, `uuid`, `fixed`, `binary` | Source type |
| `year(value)` | Extract a date or timestamp year, as years from 1970
| `date`, `timestamp`, `timestamptz`, `timestamp_ns`, `timestamptz_ns` |
`int` |
| `month(value)` | Extract a date or timestamp month, as months from
1970-01-01 | `date`, `timestamp`, `timestamptz`, `timestamp_ns`,
`timestamptz_ns` | `int` |
| `day(value)` | Extract a date or timestamp day, as days from 1970-01-01
| `date`, `timestamp`, `timestamptz`, `timestamp_ns`, `timestamptz_ns` |
`date` |
@@ -222,7 +222,7 @@ Note that `year`, `month`, and `hour` transforms produce
ordinal values and not
| Parameterized function name | Description
| Source types
| Result type |
|-----------------------------|-----------------------------------------------------------------------|----------------------------------------------------------------------------------------------|-------------|
-| `bucket(N, value)` | Hash of value, mod `N` (see [table spec
details][bucket-ref]) | Any primitive except for `geometry`,
`geography`, `boolean`, `float`, or `double` | `int` |
+| `bucket(N, value)` | Hash of value, mod `N` (see [table spec
details][bucket-ref]) | `int`, `long`, `decimal`, `date`, `time`,
`timestamp`, `timestamptz`, `timestamp_ns`, `timestamptz_ns`, `string`, `uuid`,
`fixed`, `binary` | `int` |
| `truncate(W, value)` | Value truncated to width `W` (see [table spec
details][truncate-ref]) | `int`, `long`, `decimal`, `string`, `binary`
| Source type |
[bucket-ref]: spec.md#bucket-transform-details
diff --git a/format/spec.md b/format/spec.md
index 58a21d4e5c..466d3f3635 100644
--- a/format/spec.md
+++ b/format/spec.md
@@ -646,7 +646,7 @@ Partition field IDs must be reused if an existing partition
spec contains an equ
| Transform name | Description
| Source types
| Result type |
|-------------------|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|-------------|
-| **`identity`** | Source value, unmodified
| Any primitive except for `geometry` and `geography` | Source type |
+| **`identity`** | Source value, unmodified
| `unknown`, `boolean`, `int`, `long`, `float`, `double`, `decimal`,
`date`, `time`, `timestamp`, `timestamptz`, `timestamp_ns`, `timestamptz_ns`,
`string`, `uuid`, `fixed`, `binary` | Source type |
| **`bucket[N]`** | Hash of value, mod `N` (see below)
| `int`, `long`, `decimal`, `date`, `time`, `timestamp`, `timestamptz`,
`timestamp_ns`, `timestamptz_ns`, `string`, `uuid`, `fixed`, `binary` | `int`
|
| **`truncate[W]`** | Value truncated to width `W` (see below)
| `int`, `long`, `decimal`, `string`, `binary`
| Source type |
| **`year`** | Extract a date or timestamp year, as years from 1970
| `date`, `timestamp`, `timestamptz`, `timestamp_ns`, `timestamptz_ns`
| `int` |