Skip to content

Commit

Permalink
add test and remove dbg macro
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Feb 16, 2022
1 parent 1fb64f4 commit e221fae
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/physical_plan/executors/explode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ pub(crate) struct ExplodeExec {
impl Executor for ExplodeExec {
fn execute(&mut self, state: &ExecutionState) -> Result<DataFrame> {
let df = self.input.execute(state)?;
dbg!(df.explode(&self.columns))
df.explode(&self.columns)
}
}
1 change: 1 addition & 0 deletions polars/tests/it/lazy/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod explodes;
mod projection_queries;
mod window_expressions;

use polars::prelude::*;
Expand Down
16 changes: 16 additions & 0 deletions polars/tests/it/lazy/projection_queries.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use polars::prelude::*;

#[test]
fn test_sum_after_filter() -> Result<()> {
let df = df![
"ids" => 0..10,
"values" => 10..20,
]?
.lazy()
.filter(not(col("ids").eq(lit(5))))
.select([col("values").sum()])
.collect()?;

assert_eq!(df.column("values")?.get(0), AnyValue::Int32(130));
Ok(())
}
2 changes: 2 additions & 0 deletions polars/tests/it/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
mod io;
mod joins;
mod lazy;

pub static FOODS_CSV: &str = "../examples/aggregate_multiple_files_in_chunks/datasets/foods1.csv";

0 comments on commit e221fae

Please sign in to comment.