From ffb6cc1fdd83b8e2d652a52c6f4c870003d5777a Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Mon, 21 Oct 2024 14:23:07 +0100 Subject: [PATCH] renames --- .../layouts/{inline_schema.rs => inline_dtype.rs} | 14 +++++++------- vortex-serde/src/layouts/read/layouts/mod.rs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename vortex-serde/src/layouts/read/layouts/{inline_schema.rs => inline_dtype.rs} (93%) diff --git a/vortex-serde/src/layouts/read/layouts/inline_schema.rs b/vortex-serde/src/layouts/read/layouts/inline_dtype.rs similarity index 93% rename from vortex-serde/src/layouts/read/layouts/inline_schema.rs rename to vortex-serde/src/layouts/read/layouts/inline_dtype.rs index d32ac3e46a..4a4f582ec6 100644 --- a/vortex-serde/src/layouts/read/layouts/inline_schema.rs +++ b/vortex-serde/src/layouts/read/layouts/inline_dtype.rs @@ -14,9 +14,9 @@ use crate::layouts::{ use crate::stream_writer::ByteRange; #[derive(Debug)] -pub struct InlineSchemaLayoutSpec; +pub struct InlineDTypeLayoutSpec; -impl LayoutSpec for InlineSchemaLayoutSpec { +impl LayoutSpec for InlineDType LayoutSpec { fn id(&self) -> LayoutId { INLINE_SCHEMA_LAYOUT_ID } @@ -29,7 +29,7 @@ impl LayoutSpec for InlineSchemaLayoutSpec { layout_reader: LayoutDeserializer, message_cache: RelativeLayoutCache, ) -> Box { - Box::new(InlineSchemaLayout::new( + Box::new(InlineDTypeLayout::new( fb_bytes, fb_loc, scan, @@ -40,7 +40,7 @@ impl LayoutSpec for InlineSchemaLayoutSpec { } #[derive(Debug)] -pub struct InlineSchemaLayout { +pub struct InlineDTypeLayout { fb_bytes: Bytes, fb_loc: usize, scan: Scan, @@ -54,7 +54,7 @@ enum DTypeReadResult { DType(DType), } -impl InlineSchemaLayout { +impl InlineDTypeLayout { pub fn new( fb_bytes: Bytes, fb_loc: usize, @@ -108,7 +108,7 @@ impl InlineSchemaLayout { } } -impl LayoutReader for InlineSchemaLayout { +impl LayoutReader for InlineDTypeLayout { fn read_next(&mut self) -> VortexResult> { if let Some(cr) = self.child_layout.as_mut() { cr.read_next() @@ -120,7 +120,7 @@ impl LayoutReader for InlineSchemaLayout { .flatbuffer() .children() .ok_or_else(|| vortex_err!("No children"))? - .get(1); + .get(0); self.child_layout = Some( self.layout_builder.read_layout( diff --git a/vortex-serde/src/layouts/read/layouts/mod.rs b/vortex-serde/src/layouts/read/layouts/mod.rs index ac79e63930..17498ca164 100644 --- a/vortex-serde/src/layouts/read/layouts/mod.rs +++ b/vortex-serde/src/layouts/read/layouts/mod.rs @@ -1,7 +1,7 @@ mod chunked; mod column; mod flat; -mod inline_schema; +mod inline_dtype; pub use chunked::ChunkedLayoutSpec; pub use column::ColumnLayoutSpec;