diff --git a/rust/datafusion/src/physical_plan/cartesian_join.rs b/rust/datafusion/src/physical_plan/cartesian_join.rs index 33ce982b665a8..d394b917f400a 100644 --- a/rust/datafusion/src/physical_plan/cartesian_join.rs +++ b/rust/datafusion/src/physical_plan/cartesian_join.rs @@ -223,7 +223,7 @@ fn build_batch( .iter() .map(|arr| { let scalar = ScalarValue::try_from_array(arr, i)?; - Ok(scalar.to_array_of_size(left.num_rows())) + Ok(scalar.to_array_of_size(batch.num_rows())) }) .collect::>>() .map_err(|x| x.into_arrow_external_error())?;