From 859c54eeabc8cd64826963414e0305ed341b0fe4 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Tue, 6 Aug 2024 16:57:33 +0100 Subject: [PATCH] fmt --- vortex-serde/src/layout/reader/batch.rs | 2 +- vortex-serde/src/layout/reader/buffered.rs | 2 +- vortex-serde/src/layout/reader/mod.rs | 17 ++++++++--------- vortex-serde/src/layout/tests.rs | 5 ++--- vortex-serde/src/layout/writer/layout_writer.rs | 10 ---------- 5 files changed, 12 insertions(+), 24 deletions(-) diff --git a/vortex-serde/src/layout/reader/batch.rs b/vortex-serde/src/layout/reader/batch.rs index 2263e9f5bc..c7964f8358 100644 --- a/vortex-serde/src/layout/reader/batch.rs +++ b/vortex-serde/src/layout/reader/batch.rs @@ -1,8 +1,8 @@ use std::mem; use std::sync::Arc; -use vortex::{Array, IntoArray}; use vortex::array::StructArray; +use vortex::{Array, IntoArray}; use vortex_error::VortexResult; use crate::layout::{Layout, ReadResult}; diff --git a/vortex-serde/src/layout/reader/buffered.rs b/vortex-serde/src/layout/reader/buffered.rs index e965b29401..f7d4cb5593 100644 --- a/vortex-serde/src/layout/reader/buffered.rs +++ b/vortex-serde/src/layout/reader/buffered.rs @@ -1,6 +1,6 @@ use std::collections::VecDeque; -use vortex::array::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::compute::slice; use vortex::{Array, ArrayDType, IntoArray}; use vortex_error::VortexResult; diff --git a/vortex-serde/src/layout/reader/mod.rs b/vortex-serde/src/layout/reader/mod.rs index 3ccb2e429d..294130f0a1 100644 --- a/vortex-serde/src/layout/reader/mod.rs +++ b/vortex-serde/src/layout/reader/mod.rs @@ -1,30 +1,29 @@ use std::mem; use std::pin::Pin; use std::sync::{Arc, RwLock}; -use std::task::{Context, Poll, ready}; +use std::task::{ready, Context, Poll}; use bytes::{Bytes, BytesMut}; use futures::{FutureExt, Stream}; -use futures_util::{stream, StreamExt, TryStreamExt}; use futures_util::future::BoxFuture; - +use futures_util::{stream, StreamExt, TryStreamExt}; use projections::Projection; use schema::Schema; -use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant}; use vortex::array::StructArray; -use vortex::compute::{filter, filter_indices, search_sorted, SearchSortedSide, slice, take}; use vortex::compute::unary::subtract_scalar; -use vortex_dtype::{DType, match_each_integer_ptype}; +use vortex::compute::{filter, filter_indices, search_sorted, slice, take, SearchSortedSide}; +use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant}; +use vortex_dtype::{match_each_integer_ptype, DType}; use vortex_error::{vortex_bail, VortexError, VortexResult}; use vortex_scalar::Scalar; use crate::io::VortexReadAt; -use crate::layout::{ - Layout, LayoutReader, MessageId, MessagesCache, ReadResult, RelativeMessageCache, Scan, -}; use crate::layout::footer::Footer; use crate::layout::reader::filtering::RowFilter; use crate::layout::writer::layout_writer::MAGIC_BYTES; +use crate::layout::{ + Layout, LayoutReader, MessageId, MessagesCache, ReadResult, RelativeMessageCache, Scan, +}; pub mod batch; pub mod buffered; diff --git a/vortex-serde/src/layout/tests.rs b/vortex-serde/src/layout/tests.rs index dc27c1a85c..d0923f8514 100644 --- a/vortex-serde/src/layout/tests.rs +++ b/vortex-serde/src/layout/tests.rs @@ -1,15 +1,14 @@ use std::sync::Arc; use futures::StreamExt; - -use vortex::{ArrayDType, Context, IntoArray, IntoArrayVariant}; use vortex::array::{ChunkedArray, PrimitiveArray, StructArray, VarBinArray}; +use vortex::{ArrayDType, Context, IntoArray, IntoArrayVariant}; use vortex_dtype::PType; -use crate::layout::{LayoutContext, LayoutReader}; use crate::layout::reader::projections::Projection; use crate::layout::reader::VortexLayoutReaderBuilder; use crate::layout::writer::layout_writer::LayoutWriter; +use crate::layout::{LayoutContext, LayoutReader}; #[tokio::test] #[cfg_attr(miri, ignore)] diff --git a/vortex-serde/src/layout/writer/layout_writer.rs b/vortex-serde/src/layout/writer/layout_writer.rs index 295e62552d..d13824b57c 100644 --- a/vortex-serde/src/layout/writer/layout_writer.rs +++ b/vortex-serde/src/layout/writer/layout_writer.rs @@ -4,8 +4,6 @@ use std::mem; use flatbuffers::{FlatBufferBuilder, WIPOffset}; use futures::{Stream, TryStreamExt}; use itertools::Itertools; - -use vortex::{Array, ArrayDType, IntoArray}; use vortex::array::{ChunkedArray, StructArray}; use vortex::stream::ArrayStream; use vortex::validity::Validity; @@ -266,15 +264,7 @@ impl LayoutWriter { #[cfg(test)] mod tests { use futures_executor::block_on; -<<<<<<< HEAD - use vortex::array::{PrimitiveArray, StructArray, VarBinArray}; - use vortex::IntoArray; -======= - use vortex::array::primitive::PrimitiveArray; - use vortex::array::struct_::StructArray; - use vortex::array::varbin::VarBinArray; ->>>>>>> a97576cb (more) use vortex::validity::Validity; use vortex::IntoArray;