etseidl commented on code in PR #585: URL: https://github.com/apache/parquet-format/pull/585#discussion_r3540138852
########## LogicalTypes.md: ########## @@ -635,7 +635,133 @@ The type has two type parameters: The sort order used for `GEOGRAPHY` is undefined. When writing data, no min/max statistics should be saved for this type and if such non-compliant statistics -are found during reading, they must be ignored. +are found during reading, they must be ignored. + +### FILE + +`FILE` annotates a group that represents a reference to a range of bytes, which may +be stored inline in the value, elsewhere within this file, or in an external file. It +is intended for use cases such as storing file inventories, manifests, and unstructured +data references (e.g., images or audio files stored in object storage). + +The annotated group may contain the following fields, identified by name. Field IDs +may also be used for projection. All fields are optional: + +| Field | Type | Required | +|----------------|------------|----------| +| `path` | STRING | No | +| `offset` | INT64 | No | +| `size` | INT64 | No | +| `content_type` | STRING | No | +| `checksum` | STRING | No | +| `inline` | BYTE_ARRAY | No | + +A value resolves to bytes determined by `inline` / `path` / `offset` / `size`; +`content_type` and `checksum` are metadata describing whatever is resolved. + +#### Fields + +##### path + +An opaque path string to an external file (e.g., `s3://bucket/file.jpg`). No special +encoding (e.g., URI encoding) is applied on top of the user provided data. If `path` is absent, +the value refers to this file (a self-reference). + +##### offset + +A byte offset indicating the start of the byte range within the referenced data. +If not provided, readers must treat the value as 0. +If provided and non-zero, readers must seek to this offset to retrieve the referenced data. + +##### size + +The byte length of the referenced data. Must be zero or a positive integer if provided. +A value of 0 indicates empty referenced data. If not provided, the range runs to the end Review Comment: Here too, I think "if `path` is not set or `offset` is set" -- 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]
