pvary commented on code in PR #18416: URL: https://github.com/apache/iceberg/pull/18416#discussion_r4706300363
########## format/spec.md: ########## @@ -308,6 +310,26 @@ For details on how to serialize a schema to JSON, see Appendix C. [1001]: <https://portal.ogc.org/files/?artifact_id=25355> "OGC Simple feature access" +##### Vector + +A non-null `vector(E, D)` contains exactly D elements of element type E, and every element is non-null. The vector value may be null only when the vector field is optional. + +E must be one of the following vector element types: + +| Element type | Element values | Value type | +|---------------|--------------------------------|------------| +| **`int`** | 32-bit signed integers | `int` | +| **`long`** | 64-bit signed integers | `long` | +| **`float16`** | 16-bit IEEE 754 floating point | `float` | +| **`float`** | 32-bit IEEE 754 floating point | `float` | +| **`double`** | 64-bit IEEE 754 floating point | `double` | + +Vector element types are valid only inside a `vector`; `float16` is not a primitive type and cannot be used as the type of a field. Element values follow the rules of the value type, including JSON single-value serialization. Vector equality is element-wise, using the equality rules of the value type. Floating-point elements must be finite: `NaN`, `+Infinity`, and `-Infinity` are invalid. + +`float16` element values must be finite IEEE 754 binary16 values. When stored or serialized using the `float` value type, the value must be exactly representable as binary16; writers must not produce other values and readers must reject them. Review Comment: nit: finite requirement is already there in the previous sentence ```suggestion `float16` element values must be IEEE 754 binary16 values. When stored or serialized using the `float` value type, the value must be exactly representable as binary16; writers must not produce other values and readers must reject them. ``` -- 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]
