Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nullable Arrow unions using virtual union arms #2708

Merged
merged 6 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions crates/re_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ glam = ["dep:glam", "dep:macaw"]


[dependencies]
# Rerun
re_error.workspace = true

# External
arrow2 = { workspace = true, features = [
Expand All @@ -36,6 +38,7 @@ arrow2 = { workspace = true, features = [
"compute_concatenate",
] }
anyhow.workspace = true
backtrace = "0.3"
bytemuck = { version = "1.11", features = ["derive", "extern_crate_alloc"] }
document-features = "0.2"
itertools.workspace = true
Expand Down
12 changes: 4 additions & 8 deletions crates/re_types/definitions/rerun/testing/archetypes/fuzzy.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ table AffixFuzzer1 (
fuzz1012: rerun.testing.components.AffixFuzzer12 ("attr.rerun.component_required", order: 1012);
fuzz1013: rerun.testing.components.AffixFuzzer13 ("attr.rerun.component_required", order: 1013);
fuzz1014: rerun.testing.components.AffixFuzzer14 ("attr.rerun.component_required", order: 1014);
// NOTE: nullable union -- illegal!
// fuzz1015: rerun.testing.components.AffixFuzzer15 ("attr.rerun.component_required", order: 1015);
fuzz1015: rerun.testing.components.AffixFuzzer15 ("attr.rerun.component_required", order: 1015);
fuzz1016: rerun.testing.components.AffixFuzzer16 ("attr.rerun.component_required", order: 1016);
fuzz1017: rerun.testing.components.AffixFuzzer17 ("attr.rerun.component_required", order: 1017);
fuzz1018: rerun.testing.components.AffixFuzzer18 ("attr.rerun.component_required", order: 1018);
Expand All @@ -50,8 +49,7 @@ table AffixFuzzer1 (
fuzz1112: [rerun.testing.components.AffixFuzzer12] ("attr.rerun.component_required", order: 1112);
fuzz1113: [rerun.testing.components.AffixFuzzer13] ("attr.rerun.component_required", order: 1113);
fuzz1114: [rerun.testing.components.AffixFuzzer14] ("attr.rerun.component_required", order: 1114);
// NOTE: nullable union -- illegal!
// fuzz1115: [rerun.testing.components.AffixFuzzer15] ("attr.rerun.component_required", order: 1115);
fuzz1115: [rerun.testing.components.AffixFuzzer15] ("attr.rerun.component_required", order: 1115);
fuzz1116: [rerun.testing.components.AffixFuzzer16] ("attr.rerun.component_required", order: 1116);
fuzz1117: [rerun.testing.components.AffixFuzzer17] ("attr.rerun.component_required", order: 1117);
fuzz1118: [rerun.testing.components.AffixFuzzer18] ("attr.rerun.component_required", order: 1118);
Expand All @@ -70,8 +68,7 @@ table AffixFuzzer1 (
fuzz2012: rerun.testing.components.AffixFuzzer12 ("attr.rerun.component_optional", nullable, order: 2012);
fuzz2013: rerun.testing.components.AffixFuzzer13 ("attr.rerun.component_optional", nullable, order: 2013);
fuzz2014: rerun.testing.components.AffixFuzzer14 ("attr.rerun.component_optional", nullable, order: 2014);
// NOTE: nullable union -- illegal!
// fuzz2015: rerun.testing.components.AffixFuzzer15 ("attr.rerun.component_optional", nullable, order: 2015);
fuzz2015: rerun.testing.components.AffixFuzzer15 ("attr.rerun.component_optional", nullable, order: 2015);
fuzz2016: rerun.testing.components.AffixFuzzer16 ("attr.rerun.component_optional", nullable, order: 2016);
fuzz2017: rerun.testing.components.AffixFuzzer17 ("attr.rerun.component_optional", nullable, order: 2017);
fuzz2018: rerun.testing.components.AffixFuzzer18 ("attr.rerun.component_optional", nullable, order: 2018);
Expand All @@ -90,8 +87,7 @@ table AffixFuzzer1 (
fuzz2112: [rerun.testing.components.AffixFuzzer12] ("attr.rerun.component_optional", nullable, order: 2112);
fuzz2113: [rerun.testing.components.AffixFuzzer13] ("attr.rerun.component_optional", nullable, order: 2113);
fuzz2114: [rerun.testing.components.AffixFuzzer14] ("attr.rerun.component_optional", nullable, order: 2114);
// NOTE: nullable union -- illegal!
// fuzz2115: [rerun.testing.components.AffixFuzzer15] ("attr.rerun.component_optional", nullable, order: 2115);
fuzz2115: [rerun.testing.components.AffixFuzzer15] ("attr.rerun.component_optional", nullable, order: 2115);
fuzz2116: [rerun.testing.components.AffixFuzzer16] ("attr.rerun.component_optional", nullable, order: 2116);
fuzz2117: [rerun.testing.components.AffixFuzzer17] ("attr.rerun.component_optional", nullable, order: 2117);
fuzz2118: [rerun.testing.components.AffixFuzzer18] ("attr.rerun.component_optional", nullable, order: 2118);
Expand Down
13 changes: 6 additions & 7 deletions crates/re_types/definitions/rerun/testing/components/fuzzy.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ table AffixFuzzer14 (
single_required_union: rerun.testing.datatypes.AffixFuzzer3 (order: 114);
}

// NOTE: Illegal: union don't have top-level bitmaps! Commenting out will/should break the build.
// table AffixFuzzer15 (
// "attr.rust.derive": "PartialEq",
// order: 1500
// ) {
// single_optional_union: rerun.testing.datatypes.AffixFuzzer3 (nullable, order: 115);
// }
table AffixFuzzer15 (
"attr.rust.derive": "PartialEq",
order: 1500
) {
single_optional_union: rerun.testing.datatypes.AffixFuzzer3 (nullable, order: 115);
}

table AffixFuzzer16 (
"attr.rust.derive": "PartialEq",
Expand Down
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.
289571cd5bcef516a43ead1678f39054c300890396d13933dc26d9294a07dffe
ba58a7d123c5fa81f04a58a6325ef65029d93f330d571176101db87596a9c0cf
Loading