Skip to content

Commit db2ac80

Browse files
committed
fix test, revert datafusion-testing
1 parent 71aa629 commit db2ac80

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

datafusion/physical-plan/src/joins/hash_join/shared_bounds.rs

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ mod tests {
386386
use arrow::datatypes::{DataType, Field, Schema};
387387
use arrow::record_batch::RecordBatch;
388388
use datafusion_common::cast::as_boolean_array;
389-
use datafusion_expr::ColumnarValue;
390389
use std::sync::Arc;
391390

392391
#[test]
@@ -486,7 +485,7 @@ mod tests {
486485
}
487486

488487
#[test]
489-
fn test_empty_bounds_returns_true() -> Result<()> {
488+
fn test_empty_bounds() -> Result<()> {
490489
let on_right = vec![Arc::new(datafusion_physical_expr::expressions::Column::new(
491490
"col1", 0,
492491
)) as Arc<dyn PhysicalExpr>];
@@ -508,24 +507,9 @@ mod tests {
508507
};
509508

510509
// Test with empty bounds
511-
let filter = accumulator
512-
.create_optimized_filter_from_partition_bounds(&HashMap::new())?
513-
.unwrap();
514-
515-
// Should return a literal true
516-
let schema = Schema::new(vec![Field::new("col1", DataType::Int32, false)]);
517-
let test_batch = RecordBatch::try_new(
518-
Arc::new(schema),
519-
vec![Arc::new(Int32Array::from(vec![1, 2, 3]))],
520-
)?;
521-
522-
let result = filter.evaluate(&test_batch)?;
523-
match result {
524-
ColumnarValue::Scalar(ScalarValue::Boolean(Some(true))) => {
525-
// Expected: literal true
526-
}
527-
_ => panic!("Expected scalar true for empty bounds"),
528-
}
510+
let res =
511+
accumulator.create_optimized_filter_from_partition_bounds(&HashMap::new())?;
512+
assert!(res.is_none(), "Expected None for empty bounds");
529513

530514
Ok(())
531515
}

0 commit comments

Comments
 (0)