@@ -61,9 +61,9 @@ fn rewire_tagged_components(batch: &RecordBatch) -> RecordBatch {
6161 }
6262
6363 // These metadata fields don't require value changes.
64- rename_key ( & mut metadata, "rerun.index_name" , "rerun:index_name" ) ;
65- rename_key ( & mut metadata, "rerun.entity_path" , "rerun:entity_path" ) ;
66- rename_key ( & mut metadata, "rerun.kind" , "rerun:kind" ) ;
64+ rename_key ( & mut metadata, "rerun.index_name" , crate :: metadata :: SORBET_INDEX_NAME ) ;
65+ rename_key ( & mut metadata, "rerun.entity_path" , crate :: metadata :: SORBET_ENTITY_PATH ) ;
66+ rename_key ( & mut metadata, "rerun.kind" , crate :: metadata :: RERUN_KIND ) ;
6767 rename_key ( & mut metadata, "rerun.is_static" , "rerun:is_static" ) ;
6868 rename_key ( & mut metadata, "rerun.is_indicator" , "rerun:is_indicator" ) ;
6969 rename_key ( & mut metadata, "rerun.is_tombstone" , "rerun:is_tombstone" ) ;
@@ -83,13 +83,13 @@ fn rewire_tagged_components(batch: &RecordBatch) -> RecordBatch {
8383 component. ends_with( "Indicator" ) ,
8484 "Expected component to end with 'Indicator', got: {component:?}"
8585 ) ;
86- metadata. insert ( "rerun:component" . to_owned ( ) , component) ;
86+ metadata. insert ( re_types_core :: FIELD_METADATA_KEY_COMPONENT . to_owned ( ) , component) ;
8787 } else if field_name. starts_with ( "rerun." ) {
8888 // Long name
89- metadata. insert ( "rerun:component" . to_owned ( ) , field_name. clone ( ) ) ;
89+ metadata. insert ( re_types_core :: FIELD_METADATA_KEY_COMPONENT . to_owned ( ) , field_name. clone ( ) ) ;
9090 } else {
9191 // Short name: expand it to be long
92- metadata. insert ( "rerun:component" . to_owned ( ) , format ! ( "rerun.components.{field_name}" ) ) ;
92+ metadata. insert ( re_types_core :: FIELD_METADATA_KEY_COMPONENT . to_owned ( ) , format ! ( "rerun.components.{field_name}" ) ) ;
9393 }
9494
9595 // Remove everything else.
@@ -137,11 +137,11 @@ fn rewire_tagged_components(batch: &RecordBatch) -> RecordBatch {
137137 } ;
138138
139139 if let Some ( archetype) = archetype {
140- metadata. insert ( "rerun:archetype" . to_owned ( ) , archetype) ;
140+ metadata. insert ( re_types_core :: FIELD_METADATA_KEY_ARCHETYPE . to_owned ( ) , archetype) ;
141141 }
142- metadata. insert ( "rerun:component" . to_owned ( ) , component) ;
142+ metadata. insert ( re_types_core :: FIELD_METADATA_KEY_COMPONENT . to_owned ( ) , component) ;
143143 if let Some ( component_type) = component_type {
144- metadata. insert ( "rerun:component_type" . to_owned ( ) , component_type) ;
144+ metadata. insert ( re_types_core :: FIELD_METADATA_KEY_COMPONENT_TYPE . to_owned ( ) , component_type) ;
145145 }
146146 }
147147
@@ -192,7 +192,9 @@ fn port_recording_info(batch: &mut RecordBatch) {
192192
193193 // We renamed `RecordingProperties` to `RecordingInfo`,
194194 // and moved it from `/__properties/recording` to `/__properties`.
195- if let Some ( entity_path) = batch. schema_metadata_mut ( ) . get_mut ( "rerun:entity_path" )
195+ if let Some ( entity_path) = batch
196+ . schema_metadata_mut ( )
197+ . get_mut ( crate :: metadata:: SORBET_ENTITY_PATH )
196198 && entity_path == "/__properties/recording"
197199 {
198200 * entity_path = "/__properties" . to_owned ( ) ;
@@ -220,7 +222,9 @@ fn port_recording_info(batch: &mut RecordBatch) {
220222 . with_metadata ( field. metadata ( ) . clone ( ) ) ;
221223
222224 // Migrate per-column entity paths (if any):
223- if let Some ( entity_path) = field. metadata_mut ( ) . get_mut ( "rerun:entity_path" )
225+ if let Some ( entity_path) = field
226+ . metadata_mut ( )
227+ . get_mut ( crate :: metadata:: SORBET_ENTITY_PATH )
224228 && entity_path == "/__properties/recording"
225229 {
226230 * entity_path = "/__properties" . to_owned ( ) ;
0 commit comments