rdblue commented on pull request #1919:
URL: https://github.com/apache/iceberg/pull/1919#issuecomment-745710832


   > The only open question I have is what about type promotion of partition 
fields.
   
   Partitions fields store the type output by the partition transform. In a lot 
of cases, that won't change. For example, bucket always produces ints no matter 
what the input type. Some transforms, like identity, will produce values of the 
input type. The only way to change the output type for those transforms is to 
change the input type through column promotion. When an identity partition 
column is promoted from int to long or float to double, the partition column is 
promoted automatically as well and the existing values are promoted on read.
   
   In case you're wondering, we were also careful to make sure type promotion 
doesn't change the result of any partition functions. If the partition 
transform doesn't produce the same value when it is promoted after 
transformation, then promotion must be done before the transformation: 
`bucket(int_col, width)` is actually `bucket((long) int_col, width)`.


----------------------------------------------------------------
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.

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