Skip to content

Commit bb09b8c

Browse files
committed
fix
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 46e3e32 commit bb09b8c

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

vortex-array/src/executor.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,10 @@ impl ArrayRef {
176176
}
177177

178178
/// Execution context for batch CPU compute.
179-
///
180-
/// In debug builds, accumulates a trace of execution steps: individual steps are logged at TRACE
181-
/// level for real-time following, and the full trace is dumped at DEBUG level on drop.
182-
/// In release builds the tracing fields are compiled out entirely — `log` is a zero-overhead
183-
/// no-op and the struct holds only the session.
184179
#[derive(Debug, Clone)]
185180
pub struct ExecutionCtx {
186181
session: VortexSession,
187-
#[cfg(debug_assertions)]
188182
id: usize,
189-
#[cfg(debug_assertions)]
190183
ops: Vec<String>,
191184
}
192185

@@ -195,12 +188,10 @@ impl ExecutionCtx {
195188
pub fn new(session: VortexSession) -> Self {
196189
Self {
197190
session,
198-
#[cfg(debug_assertions)]
199191
id: {
200192
static EXEC_CTX_ID: AtomicUsize = AtomicUsize::new(0);
201193
EXEC_CTX_ID.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
202194
},
203-
#[cfg(debug_assertions)]
204195
ops: Vec::new(),
205196
}
206197
}
@@ -223,7 +214,6 @@ impl ExecutionCtx {
223214
/// Use the [`format_args!`] macro to create the `msg` argument.
224215
#[inline]
225216
pub fn log(&mut self, _msg: fmt::Arguments<'_>) {
226-
#[cfg(debug_assertions)]
227217
if tracing::enabled!(tracing::Level::DEBUG) {
228218
let formatted = format!(" - {_msg}");
229219
tracing::trace!("exec[{}]: {formatted}", self.id);
@@ -234,16 +224,12 @@ impl ExecutionCtx {
234224

235225
impl Display for ExecutionCtx {
236226
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
237-
#[cfg(debug_assertions)]
238227
return write!(f, "exec[{}]", self.id);
239-
#[cfg(not(debug_assertions))]
240-
write!(f, "exec")
241228
}
242229
}
243230

244231
impl Drop for ExecutionCtx {
245232
fn drop(&mut self) {
246-
#[cfg(debug_assertions)]
247233
if !self.ops.is_empty() && tracing::enabled!(tracing::Level::DEBUG) {
248234
// Unlike itertools `.format()` (panics in 0.14 on second format)
249235
struct FmtOps<'a>(&'a [String]);

0 commit comments

Comments
 (0)