Skip to content

Commit

Permalink
rerun codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jun 20, 2023
1 parent 8cb951a commit 49ae282
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 19 deletions.
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a sha256 hash for all direct and indirect dependencies of this crate's build script.
# It can be safely removed at anytime to force the build script to run again.
# Check out build.rs to see how it's computed.
b064d1e9d76b26cb03e6482a2e29f8c46c94df8c5d7dfce6522ca2a61da8807b
89b8667f7bf63607409cebcd2704761b0d8f305ddb6f5d11f9ac9b1f345a6055
6 changes: 5 additions & 1 deletion crates/re_types/src/components/class_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ impl crate::Component for ClassId {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::UInt16
DataType::Extension(
"rerun.components.ClassId".to_owned(),
Box::new(DataType::UInt16),
None,
)
}
}
6 changes: 5 additions & 1 deletion crates/re_types/src/components/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ impl crate::Component for Color {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::UInt32
DataType::Extension(
"rerun.components.Color".to_owned(),
Box::new(DataType::UInt32),
None,
)
}
}
6 changes: 5 additions & 1 deletion crates/re_types/src/components/draw_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ impl crate::Component for DrawOrder {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::Float32
DataType::Extension(
"rerun.components.DrawOrder".to_owned(),
Box::new(DataType::Float32),
None,
)
}
}
6 changes: 5 additions & 1 deletion crates/re_types/src/components/instance_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ impl crate::Component for InstanceKey {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::UInt64
DataType::Extension(
"rerun.components.InstanceKey".to_owned(),
Box::new(DataType::UInt64),
None,
)
}
}
6 changes: 5 additions & 1 deletion crates/re_types/src/components/keypoint_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ impl crate::Component for KeypointId {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::UInt16
DataType::Extension(
"rerun.components.KeypointId".to_owned(),
Box::new(DataType::UInt16),
None,
)
}
}
6 changes: 5 additions & 1 deletion crates/re_types/src/components/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ impl crate::Component for Label {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::Utf8
DataType::Extension(
"rerun.components.Label".to_owned(),
Box::new(DataType::Utf8),
None,
)
}
}
4 changes: 2 additions & 2 deletions crates/re_types/src/components/point2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ impl crate::Component for Point2D {
Field {
name: "x".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
is_nullable: false,
metadata: [].into(),
},
Field {
name: "y".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
is_nullable: false,
metadata: [].into(),
},
])),
Expand Down
6 changes: 5 additions & 1 deletion crates/re_types/src/components/radius.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ impl crate::Component for Radius {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::Float32
DataType::Extension(
"rerun.components.Radius".to_owned(),
Box::new(DataType::Float32),
None,
)
}
}
20 changes: 12 additions & 8 deletions crates/re_types/src/datatypes/vec2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ impl crate::Datatype for Vec2D {
#[allow(clippy::wildcard_imports)]
fn to_arrow_datatype() -> arrow2::datatypes::DataType {
use ::arrow2::datatypes::*;
DataType::FixedSizeList(
Box::new(Field {
name: "item".to_owned(),
data_type: DataType::Float32,
is_nullable: false,
metadata: [].into(),
}),
2usize,
DataType::Extension(
"rerun.datatypes.Vec2D".to_owned(),
Box::new(DataType::FixedSizeList(
Box::new(Field {
name: "item".to_owned(),
data_type: DataType::Float32,
is_nullable: false,
metadata: [].into(),
}),
2usize,
)),
None,
)
}
}
2 changes: 1 addition & 1 deletion rerun_py/rerun_sdk/rerun2/components/point2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Point2DType(pa.ExtensionType): # type: ignore[misc]
def __init__(self: type[pa.ExtensionType]) -> None:
pa.ExtensionType.__init__(
self,
pa.struct([pa.field("x", pa.float32(), True, {}), pa.field("y", pa.float32(), True, {})]),
pa.struct([pa.field("x", pa.float32(), False, {}), pa.field("y", pa.float32(), False, {})]),
"rerun.components.Point2D",
)

Expand Down

0 comments on commit 49ae282

Please sign in to comment.