rdblue opened a new pull request #924: Add void transform that always produces 
null
URL: https://github.com/apache/incubator-iceberg/pull/924
 
 
   This adds a new transform function, `void`, that always produces a null 
value. Because `void` and `null` are Java keywords, the `PartitionSpecBuilder` 
is configured using `alwaysNull`.
   
   The purpose of this transform is to be a stand-in for partition transforms 
that are removed from a spec. In the v1 table format, IDs for partition fields 
are not tracked by `PartitionSpec`. Instead, they are assigned starting at 1000 
for each spec. Because tables may have more than one spec, manifest files could 
have incompatible partition field structs. This is not a problem for job 
planning because each manifest is read independently, but it can break metadata 
tables that show a union of all manifest data files or entries.
   
   The `void` transform can be used to avoid a problem with ID assignment. If a 
table has two partition fields, `1000: categorical string, 1001: ts_day int`, 
then removing the `categorical` partition will create a new partition spec with 
`1000: ts_day int`. That would create a problem in the metadata tables. Instead 
of deleting the categorical partition, it should be replaced with a `void` 
partition to keep the IDs aligned: `1000: always_null string, 1001: ts_day int`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to