From f3b5a7b150fff13bb0ccc5c5ebbe7cdd15697cc0 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 18 Dec 2024 19:16:41 +0100 Subject: [PATCH] More conversion; better naming --- crates/viewer/re_chunk_store_ui/src/arrow_ui.rs | 2 +- crates/viewer/re_chunk_store_ui/src/chunk_ui.rs | 2 +- .../re_view_time_series/src/line_visualizer_system.rs | 10 +++++----- .../re_view_time_series/src/point_visualizer_system.rs | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs b/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs index aee17cbd5442..f3ee0ef8abd3 100644 --- a/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs +++ b/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs @@ -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); diff --git a/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs b/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs index 2007531b7512..d7283f48a6a5 100644 --- a/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs +++ b/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs @@ -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()); diff --git a/crates/viewer/re_view_time_series/src/line_visualizer_system.rs b/crates/viewer/re_view_time_series/src/line_visualizer_system.rs index 140bc073bf28..03ee2a16469b 100644 --- a/crates/viewer/re_view_time_series/src/line_visualizer_system.rs +++ b/crates/viewer/re_view_time_series/src/line_visualizer_system.rs @@ -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}, @@ -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(), @@ -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::(&Scalar::name())) @@ -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 { raw.first().map(|c| { @@ -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()); diff --git a/crates/viewer/re_view_time_series/src/point_visualizer_system.rs b/crates/viewer/re_view_time_series/src/point_visualizer_system.rs index 9ab73b3855f1..912fbd149474 100644 --- a/crates/viewer/re_view_time_series/src/point_visualizer_system.rs +++ b/crates/viewer/re_view_time_series/src/point_visualizer_system.rs @@ -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; @@ -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(), @@ -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() @@ -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 { raw.first().map(|c| { @@ -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());