singhpk234 commented on code in PR #17918: URL: https://github.com/apache/iceberg/pull/17918#discussion_r4266790031
########## format/spec.md: ########## @@ -322,6 +325,35 @@ For `geography` types, an additional parameter A specifies an algorithm for inte * `andoyer`: Thomas, Paul D. Mathematical models for navigation systems. US Naval Oceanographic Office, 1965. * `karney`: [Karney, Charles FF. "Algorithms for geodesics." Journal of Geodesy 87 (2013): 43-55](https://link.springer.com/content/pdf/10.1007/s00190-012-0578-z.pdf), and [GeographicLib](https://geographiclib.sourceforge.io/) +#### File Type + +A **`file`** represents a range of bytes that may be stored inline as a value or as a reference to an external file. The `file` type and its value semantics are defined by the `FILE` logical type in the [Parquet project](https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file). + +A `file` value has a fixed set of sub-fields. The sub-fields are implicit: they are not represented in the Iceberg schema and cannot be added, removed, reordered, or promoted. Their names, types, and field-ID offsets are: + +| Sub-field | ID offset | Type | +|----------------|-----------|----------| +| `uri` | +1 | `string` | +| `offset` | +2 | `long` | +| `size` | +3 | `long` | +| `content_type` | +4 | `string` | +| `checksum` | +5 | `string` | +| `inline` | +6 | `binary` | + +A `file` field reserves the root field's ID plus six consecutive IDs for its sub-fields, assigned by the offsets above. Adding a `file` field must advance `last-column-id` to account for all 7 IDs. Review Comment: I agree i was mostly talking of struct which contains file and what assumptions we have baked in the id assignment to have id assignment streamlined, to avoid case like : https://lists.apache.org/thread.html/qvdpc2hj6os2bbgtwkczcrrkmoqkp520?find_parent=true , but it seems like its already different across implementation checking @RussellSpitzer implementation it seems like we do need this https://github.com/apache/iceberg/pull/18252/changes#diff-863e4ce3ce49a6ec2c5c293626ea231c01d7505f7cbeebe2ed8746f6fc34530cR53 Agree not a problem though with not an issue with the spec, while researching this more, convinced myself not to even have implementation note :) -- 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]
