pub(super) fn instance_schema(include_rotation: bool) -> Arc<Schema>Expand description
The optimized transport’s instance table.
Lives here, beside mesh_schema(), because the two share their trailing
block and differ only in the leading identity columns (entity_id vs
express_id). It was inline in parquet_optimized.rs, which is how the
pair drifted by hand in the first place.
The rot0..rot8 tail (issue #3575) is appended after the columns shared
with mesh_schema() rather than folded into shared_trailing_fields(),
because the two schemas gate it independently: this one omits it entirely
when no non-identity rotation was written (wire version 2), while
mesh_schema() always emits it from -parquet-v6 on. It was
/optimized-ONLY until #3888 brought rotation-aware sharing to the flat
route. A row-major 3x3, in the SAME Y-up
frame as origin_x/y/z: world = origin + R * template_position. Nine
plain columns (not a quaternion) because the underlying transform can carry
non-uniform scale/shear baked in by an IfcCartesianTransformationOperator,
which a quaternion cannot represent losslessly; identity
(1,0,0,0,1,0,0,0,1) for every instance the server did not verify as a
rotation-safe dedup, which is exactly today’s origin-only placement.
include_rotation is false when the writer produced no non-identity
rotation at all: the table is then byte-shaped exactly as it was before
#3575 and ships under wire version 2, so a client that predates the
rotation columns keeps decoding it (see optimized_wire_version in
parquet_optimized.rs).