Skip to content

Commit

Permalink
Make ArrowString an opaque type (#8365)
Browse files Browse the repository at this point in the history
* Par of #3741
  • Loading branch information
emilk authored Dec 9, 2024
1 parent 83a7376 commit 04125bb
Show file tree
Hide file tree
Showing 20 changed files with 98 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ fn quote_arrow_field_deserializer(
objects,
datatype,
IteratorKind::ResultOptionValue,
quote!(::re_types_core::ArrowString).into(),
quote!(::re_types_core::ArrowString::from).into(),
);

let data_src_buf = format_ident!("{data_src}_buf");
Expand Down
4 changes: 2 additions & 2 deletions crates/build/re_types_builder/src/codegen/rust/serializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ fn quote_arrow_field_serializer(
(
quote! {
.flat_map(|datum| {
datum.#quoted_member_accessor.0
datum.#quoted_member_accessor.into_arrow2_buffer()
})
},
quote! {
Expand All @@ -618,7 +618,7 @@ fn quote_arrow_field_serializer(
} else {
(
quote! {
.flat_map(|s| s.0)
.flat_map(|s| s.into_arrow2_buffer())
},
quote! {
.map(|datum| datum.len())
Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_chunk/src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ impl Chunk {
let offsets = &offsets.as_slice()[idx..idx + len];
let lengths = &lengths.as_slice()[idx..idx + len];
izip!(offsets, lengths)
.map(|(&idx, &len)| ArrowString(values.clone().sliced(idx as _, len)))
.map(|(&idx, &len)| ArrowString::from(values.clone().sliced(idx as _, len)))
.collect_vec()
}),
)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/store/re_types/src/datatypes/annotation_info.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions crates/store/re_types/src/datatypes/tensor_dimension.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions crates/store/re_types/src/datatypes/utf8pair.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions crates/store/re_types/src/testing/components/affix_fuzzer10.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions crates/store/re_types/src/testing/components/affix_fuzzer9.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 04125bb

Please sign in to comment.