Skip to content

Commit b8a88e5

Browse files
committed
geo schema type and table feat
1 parent dc5d29e commit b8a88e5

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

kernel/src/schema/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,12 +1705,20 @@ pub enum PrimitiveType {
17051705
Decimal(DecimalType),
17061706
/// A geometry type with an associated spatial reference identifier.
17071707
/// Values are stored as WKB (Well-Known Binary) bytes.
1708+
///
1709+
/// The payload is boxed so the `PrimitiveType` enum stays small (the heap-allocated
1710+
/// `String` SRID would otherwise widen the enum and propagate through `DataType` ->
1711+
/// `Scalar` -> `Error`, pushing `Error` past clippy's `result_largcccccdcncujbvftlukugculvvecldjeegegnlchrhuub
1712+
/// cccccdcncujblfhtvrjvfbtivgiutujvckdfvtulibcl
1713+
/// e_err` threshold).
17081714
#[serde(serialize_with = "serialize_geometry", untagged)]
1709-
Geometry(GeometryType),
1715+
Geometry(Box<GeometryType>),
17101716
/// A geography type with an associated SRID and edge interpolation algorithm.
17111717
/// Values are stored as WKB bytes.
1718+
///
1719+
/// Boxed for the same reason as `Geometry`: keep the enum payload small.
17121720
#[serde(serialize_with = "serialize_geography", untagged)]
1713-
Geography(GeographyType),
1721+
Geography(Box<GeographyType>),
17141722
}
17151723

17161724
impl PrimitiveType {

0 commit comments

Comments
 (0)