Skip to content

Commit

Permalink
Move flatbuffer schema project functions around
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 committed Aug 22, 2024
1 parent 4038a40 commit 7723725
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
7 changes: 4 additions & 3 deletions vortex-dtype/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ pub use dtype::*;
pub use extension::*;
pub use half;
pub use nullability::*;
pub use project::*;
pub use ptype::*;

mod dtype;
mod extension;
pub mod field;
mod nullability;
#[cfg(feature = "flatbuffers")]
mod project;
mod ptype;
mod serde;

#[cfg(feature = "proto")]
pub mod proto {
pub use vortex_proto::dtype;

pub use super::serde::proto::*;
}

#[cfg(feature = "flatbuffers")]
pub mod flatbuffers {
pub use vortex_flatbuffers::dtype::*;

pub use super::serde::flatbuffers::*;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ use vortex_flatbuffers::{FlatBufferRoot, WriteFlatBuffer};

use crate::{flatbuffers as fb, DType, ExtDType, ExtID, ExtMetadata, PType, StructDType};

mod project;
pub use project::*;

impl TryFrom<fb::DType<'_>> for DType {
type Error = VortexError;

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions vortex-dtype/src/serde/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#[cfg(feature = "flatbuffers")]
mod flatbuffers;
pub mod flatbuffers;
#[cfg(feature = "proto")]
mod proto;
pub mod proto;
#[allow(clippy::module_inception)]
mod serde;
pub mod serde;

#[cfg(test)]
#[cfg(feature = "serde")]
Expand Down
2 changes: 1 addition & 1 deletion vortex-serde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pin-project = { workspace = true }
tokio = { workspace = true, features = ["io-util", "fs"], optional = true }
vortex-array = { workspace = true }
vortex-buffer = { workspace = true }
vortex-dtype = { workspace = true }
vortex-dtype = { workspace = true, features = ["flatbuffers"] }
vortex-error = { workspace = true, features = ["object_store"] }
vortex-expr = { workspace = true }
vortex-flatbuffers = { workspace = true, features = ["file"] }
Expand Down
3 changes: 2 additions & 1 deletion vortex-serde/src/layouts/read/footer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use bytes::Bytes;
use flatbuffers::root;
use vortex_dtype::field::Field;
use vortex_dtype::{deserialize_and_project, resolve_field_references, DType};
use vortex_dtype::flatbuffers::{deserialize_and_project, resolve_field_references};
use vortex_dtype::DType;
use vortex_error::{vortex_err, VortexResult};
use vortex_flatbuffers::{message as fb, ReadFlatBuffer};

Expand Down

0 comments on commit 7723725

Please sign in to comment.