From f2ccdadcf6ad6efc19fbe4d508bafac394e91c07 Mon Sep 17 00:00:00 2001 From: Subhra264 Date: Tue, 23 Jun 2026 12:54:31 +0530 Subject: [PATCH] fix: if record is null in pipeline, ignore it (#12825) Currently in pipeline execution, if any null record is encountered, it results in errors. Instead it should just ignore the null records and continue. It is very common in pipeline vrls to use -`. = null` when certain condition matches. --- src/service/pipeline/batch_execution.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/service/pipeline/batch_execution.rs b/src/service/pipeline/batch_execution.rs index c20d02c9a9..723a672841 100644 --- a/src/service/pipeline/batch_execution.rs +++ b/src/service/pipeline/batch_execution.rs @@ -792,6 +792,14 @@ async fn process_node( }; } + // A null / non-object record means an upstream function filtered it + // out (e.g. VRL `. = null`). Drop it instead of forwarding to the + // destination, where it would fail at handle_timestamp with + // "Value is not an object" and inflate the failed count. + if !record.is_object() { + continue; + } + let mut destination_stream = stream_params.clone(); if destination_stream.stream_name.contains("{") { match resolve_stream_name(&destination_stream.stream_name, &record) { @@ -943,6 +951,13 @@ async fn process_node( flattened = true; } + // A null / non-object record means an upstream function filtered it out + // (e.g. VRL `. = null`). Skip it: it can't satisfy any condition and + // `as_object().unwrap()` below would panic on a null. + if !record.is_object() { + continue; + } + // Evaluate based on condition version let eval_timer = Instant::now(); let passes = match condition_params {