Skip to content

Commit

Permalink
More conversion; better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 18, 2024
1 parent 9bd7052 commit f3b5a7b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion crates/viewer/re_chunk_store_ui/src/arrow_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use re_ui::UiExt;
// Note: this is copied and heavily modified from `re_data_ui`. We don't want to unify them because
// that would likely introduce an undesired dependency (`re_chunk_store_ui` should remain as
// independent as possible from the viewer, so it may be split off one day).
pub(crate) fn arrow_ui(ui: &mut egui::Ui, array: &dyn arrow2::array::Array) {
pub(crate) fn arrow2_ui(ui: &mut egui::Ui, array: &dyn arrow2::array::Array) {
ui.scope(|ui| {
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Truncate);

Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_chunk_store_ui/src/chunk_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl ChunkUi {
chunk.component_batch_raw(&component_desc.component_name, row_index);
match component_data {
Some(Ok(data)) => {
crate::arrow_ui::arrow_ui(ui, &*data);
crate::arrow_ui::arrow2_ui(ui, &*data);
}
Some(Err(err)) => {
ui.error_with_details_on_hover(err.to_string());
Expand Down
10 changes: 5 additions & 5 deletions crates/viewer/re_view_time_series/src/line_visualizer_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use re_chunk_store::{RangeQuery, RowId};
use re_log_types::{EntityPath, TimeInt};
use re_types::archetypes;
use re_types::components::{AggregationPolicy, ClearIsRecursive};
use re_types::external::arrow2::datatypes::DataType as Arrow2Datatype;
use re_types::external::arrow::datatypes::DataType as ArrowDatatype;
use re_types::{
archetypes::SeriesLine,
components::{Color, Name, Scalar, StrokeWidth},
Expand Down Expand Up @@ -243,7 +243,7 @@ impl SeriesLineSystem {
chunk.iter_component_indices(&query.timeline(), &Scalar::name())
})
.map(|(data_time, _)| {
debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64);
debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64);

PlotPoint {
time: data_time.as_i64(),
Expand All @@ -257,7 +257,7 @@ impl SeriesLineSystem {
{
re_tracing::profile_scope!("fill values");

debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64);
debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64);
all_scalar_chunks
.iter()
.flat_map(|chunk| chunk.iter_primitive::<f64>(&Scalar::name()))
Expand All @@ -281,7 +281,7 @@ impl SeriesLineSystem {
{
re_tracing::profile_scope!("fill colors");

debug_assert_eq!(Color::arrow2_datatype(), Arrow2Datatype::UInt32);
debug_assert_eq!(Color::arrow_datatype(), ArrowDatatype::UInt32);

fn map_raw_color(raw: &[u32]) -> Option<re_renderer::Color32> {
raw.first().map(|c| {
Expand Down Expand Up @@ -334,7 +334,7 @@ impl SeriesLineSystem {
{
re_tracing::profile_scope!("fill stroke widths");

debug_assert_eq!(StrokeWidth::arrow2_datatype(), Arrow2Datatype::Float32);
debug_assert_eq!(StrokeWidth::arrow_datatype(), ArrowDatatype::Float32);

{
let all_stroke_width_chunks = results.get_optional_chunks(&StrokeWidth::name());
Expand Down
10 changes: 5 additions & 5 deletions crates/viewer/re_view_time_series/src/point_visualizer_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use itertools::Itertools as _;
use re_types::{
archetypes::{self, SeriesPoint},
components::{Color, MarkerShape, MarkerSize, Name, Scalar},
external::arrow2::datatypes::DataType as Arrow2Datatype,
external::arrow::datatypes::DataType as ArrowDatatype,
Archetype as _, Component as _, Loggable as _,
};
use re_view::range_with_blueprint_resolved_data;
Expand Down Expand Up @@ -257,7 +257,7 @@ impl SeriesPointSystem {
chunk.iter_component_indices(&query.timeline(), &Scalar::name())
})
.map(|(data_time, _)| {
debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64);
debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64);

PlotPoint {
time: data_time.as_i64(),
Expand All @@ -271,7 +271,7 @@ impl SeriesPointSystem {
{
re_tracing::profile_scope!("fill values");

debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64);
debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64);
let mut i = 0;
all_scalar_chunks
.iter()
Expand All @@ -297,7 +297,7 @@ impl SeriesPointSystem {
{
re_tracing::profile_scope!("fill colors");

debug_assert_eq!(Color::arrow2_datatype(), Arrow2Datatype::UInt32);
debug_assert_eq!(Color::arrow_datatype(), ArrowDatatype::UInt32);

fn map_raw_color(raw: &[u32]) -> Option<re_renderer::Color32> {
raw.first().map(|c| {
Expand Down Expand Up @@ -351,7 +351,7 @@ impl SeriesPointSystem {
{
re_tracing::profile_scope!("fill marker sizes");

debug_assert_eq!(MarkerSize::arrow2_datatype(), Arrow2Datatype::Float32);
debug_assert_eq!(MarkerSize::arrow_datatype(), ArrowDatatype::Float32);

{
let all_marker_size_chunks = results.get_optional_chunks(&MarkerSize::name());
Expand Down

0 comments on commit f3b5a7b

Please sign in to comment.