Skip to content

Commit

Permalink
refactor(rust): Move new-streaming parquet and CSV sources to under `…
Browse files Browse the repository at this point in the history
…io_sources/` (#20160)
  • Loading branch information
nameexhaustion authored Dec 5, 2024
1 parent b019e42 commit 300340a
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ use polars_utils::mmap::MemSlice;
use polars_utils::pl_str::PlSmallStr;
use polars_utils::IdxSize;

use super::compute_node_prelude::*;
use super::{MorselSeq, TaskPriority};
use crate::async_executor;
use crate::async_primitives::connector::connector;
use crate::async_primitives::wait_group::{IndexedWaitGroup, WaitToken};
use crate::morsel::SourceToken;
use crate::nodes::compute_node_prelude::*;
use crate::nodes::{MorselSeq, TaskPriority};

struct LineBatch {
bytes: MemSlice,
Expand Down
3 changes: 3 additions & 0 deletions crates/polars-stream/src/nodes/io_sources/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
pub mod csv;
pub mod ipc;
#[cfg(feature = "parquet")]
pub mod parquet;
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use polars_plan::prelude::FileScanOptions;
use polars_utils::index::AtomicIdxSize;
use polars_utils::pl_str::PlSmallStr;

use super::compute_node_prelude::*;
use super::{MorselSeq, TaskPriority};
use crate::async_primitives::wait_group::WaitToken;
use crate::morsel::SourceToken;
use crate::nodes::compute_node_prelude::*;
use crate::nodes::{MorselSeq, TaskPriority};
use crate::utils::task_handles_ext;

mod init;
Expand Down
3 changes: 0 additions & 3 deletions crates/polars-stream/src/nodes/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod csv_source;
pub mod filter;
pub mod group_by;
pub mod in_memory_map;
Expand All @@ -11,8 +10,6 @@ pub mod joins;
pub mod map;
pub mod multiplexer;
pub mod ordered_union;
#[cfg(feature = "parquet")]
pub mod parquet_source;
pub mod reduce;
pub mod select;
pub mod simple_projection;
Expand Down
4 changes: 2 additions & 2 deletions crates/polars-stream/src/physical_plan/to_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ fn to_graph_rec<'a>(
} => {
if std::env::var("POLARS_DISABLE_PARQUET_SOURCE").as_deref() != Ok("1") {
ctx.graph.add_node(
nodes::parquet_source::ParquetSourceNode::new(
nodes::io_sources::parquet::ParquetSourceNode::new(
scan_sources,
file_info,
hive_parts,
Expand Down Expand Up @@ -395,7 +395,7 @@ fn to_graph_rec<'a>(
}

ctx.graph.add_node(
nodes::csv_source::CsvSourceNode::new(
nodes::io_sources::csv::CsvSourceNode::new(
scan_sources,
file_info,
file_options,
Expand Down

0 comments on commit 300340a

Please sign in to comment.