rdblue commented on code in PR #10955:
URL: https://github.com/apache/iceberg/pull/10955#discussion_r1725962969


##########
format/spec.md:
##########
@@ -222,11 +228,41 @@ Schemas may be evolved by type promotion or adding, 
deleting, renaming, or reord
 
 Evolution applies changes to the table's current schema to produce a new 
schema that is identified by a unique schema ID, is added to the table's list 
of schemas, and is set as the table's current schema.
 
-Valid type promotions are:
+Valid primitive type promotions are:
+
+| Primitive type   | v1, v2 valid type promotions | v3+ valid type promotions  
                | Requirements |
+|------------------|------------------------------|--------------------------------------------|--------------|
+| `unknown`        |                              | _any type_                 
                | |
+| `int`            | `long`                       | `long`, `string`           
                | |
+| `long`           |                              | `string`                   
                | |
+| `date`           |                              | `timestamp`, 
`timestamp_ns`                | Promotion to `timestamptz` or `timestamptz_ns` 
is **not** allowed |

Review Comment:
   We wanted to do this (although it is closer to `timestamptz`) but that hits 
the problem covered by the next paragraph and table. You can't tell whether a 
lower/upper bound value was written as a `timestamptz` or a `long`. If both 
values are in microseconds, we'd be fine. But most people store timestamps as 
`long` in milliseconds. That's what we were hoping to support with long to 
timestamp promotion, but it won't work until we have more information about the 
original type of the bounds.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to