Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 committed Nov 27, 2024
1 parent 4b0299b commit ca43ad6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ enum RowMaskState<V> {
Empty,
}

pub struct Coalescer<R, S, V, RM> {
pub struct BufferedLayoutReader<R, S, V, RM> {
values: S,
row_mask_reader: RM,
in_flight: Option<BoxFuture<'static, io::Result<Vec<Message>>>>,
Expand All @@ -53,7 +53,7 @@ pub struct Coalescer<R, S, V, RM> {
cache: Arc<RwLock<LayoutMessageCache>>,
}

impl<R, S, V, RM> Coalescer<R, S, V, RM>
impl<R, S, V, RM> BufferedLayoutReader<R, S, V, RM>
where
R: VortexReadAt,
S: Stream<Item = VortexResult<RowMask>> + Unpin,
Expand Down Expand Up @@ -177,7 +177,7 @@ where
}
}

impl<R, S, V, RM> Stream for Coalescer<R, S, V, RM>
impl<R, S, V, RM> Stream for BufferedLayoutReader<R, S, V, RM>
where
R: VortexReadAt + Unpin,
S: Stream<Item = VortexResult<RowMask>> + Unpin,
Expand Down
6 changes: 3 additions & 3 deletions vortex-file/src/read/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ use vortex_error::VortexResult;
use vortex_io::{IoDispatcher, VortexReadAt};

use super::{LayoutMessageCache, LayoutReader};
use crate::read::coalescer::{Coalescer, RowMaskReader};
use crate::read::buffered::{BufferedLayoutReader, RowMaskReader};
use crate::{MessageRead, RowMask};

type MetadataCoalescer<R> = Coalescer<
type MetadataCoalescer<R> = BufferedLayoutReader<
R,
Box<dyn Stream<Item = VortexResult<RowMask>> + Send + Unpin>,
Vec<Option<ArrayData>>,
Expand Down Expand Up @@ -51,7 +51,7 @@ impl<R: VortexReadAt + Unpin> MetadataFetcher<R> {
root_layout: Box<dyn LayoutReader>,
layout_cache: Arc<RwLock<LayoutMessageCache>>,
) -> Self {
let metadata_reader = Coalescer::new(
let metadata_reader = BufferedLayoutReader::new(
input,
dispatcher,
Box::new(stream::iter(iter::once(Ok(RowMask::new_valid_between(
Expand Down
2 changes: 1 addition & 1 deletion vortex-file/src/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use bytes::Bytes;
use vortex_array::ArrayData;
use vortex_error::VortexResult;

mod buffered;
pub mod builder;
mod cache;
mod coalescer;
mod context;
mod expr_project;
mod filtering;
Expand Down
2 changes: 1 addition & 1 deletion vortex-file/src/read/splits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use itertools::Itertools;
use vortex_array::stats::ArrayStatistics;
use vortex_error::{vortex_bail, VortexExpect, VortexResult};

use crate::read::coalescer::RowMaskReader;
use crate::read::buffered::RowMaskReader;
use crate::{BatchRead, LayoutReader, MessageRead, RowMask, SplitRead};

enum SplitState {
Expand Down
8 changes: 4 additions & 4 deletions vortex-file/src/read/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use vortex_dtype::DType;
use vortex_error::{vortex_panic, VortexResult, VortexUnwrap};
use vortex_io::{IoDispatcher, VortexReadAt};

use crate::read::buffered::{BufferedLayoutReader, MaskLayoutReader};
use crate::read::cache::LayoutMessageCache;
use crate::read::coalescer::{Coalescer, MaskLayoutReader};
use crate::read::mask::RowMask;
use crate::read::splits::{FixedSplitIterator, RowMaskLayoutReader};
use crate::read::LayoutReader;
Expand All @@ -28,7 +28,7 @@ use crate::LazyDType;
pub struct VortexFileArrayStream<R> {
dtype: Arc<LazyDType>,
row_count: u64,
array_reader: Coalescer<
array_reader: BufferedLayoutReader<
R,
Box<dyn Stream<Item = VortexResult<RowMask>> + Send + Unpin>,
ArrayData,
Expand Down Expand Up @@ -57,7 +57,7 @@ impl<R: VortexReadAt + Unpin> VortexFileArrayStream<R> {
split_iterator.additional_splits(&mut reader_splits)?;

let mask_iterator = if let Some(fr) = filter_reader {
Box::new(Coalescer::new(
Box::new(BufferedLayoutReader::new(
input.clone(),
dispatcher.clone(),
split_iterator,
Expand All @@ -68,7 +68,7 @@ impl<R: VortexReadAt + Unpin> VortexFileArrayStream<R> {
Box::new(split_iterator) as _
};

let array_reader = Coalescer::new(
let array_reader = BufferedLayoutReader::new(
input,
dispatcher,
mask_iterator,
Expand Down

0 comments on commit ca43ad6

Please sign in to comment.