Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(rust): Move new-streaming parquet and CSV sources to under io_sources/ #20160

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading