diff --git a/datafusion/optimizer/src/optimizer.rs b/datafusion/optimizer/src/optimizer.rs index efb2cd7ea7ac..87ccaccd1d44 100644 --- a/datafusion/optimizer/src/optimizer.rs +++ b/datafusion/optimizer/src/optimizer.rs @@ -405,6 +405,7 @@ impl Optimizer { Box::new(e), ) })?; + #[cfg(debug_assertions)] tnr.data.check_invariants(InvariantLevel::Executable) .map_err(|e| { DataFusionError::Context(