diff --git a/wrangler-transform/src/main/java/io/cdap/wrangler/Wrangler.java b/wrangler-transform/src/main/java/io/cdap/wrangler/Wrangler.java index 340750d62..89a95403c 100644 --- a/wrangler-transform/src/main/java/io/cdap/wrangler/Wrangler.java +++ b/wrangler-transform/src/main/java/io/cdap/wrangler/Wrangler.java @@ -381,6 +381,15 @@ public void destroy() { */ @Override public void transform(StructuredRecord input, Emitter emitter) throws Exception { + // The Transform function should never execute if SQL filters are enabled. SQL filters are + // handled by the LinearRelationalTransform implementation. If this code is reached, it means + // the LinearRelationalTransform could not be executed correctly. + if (PRECONDITION_LANGUAGE_SQL.equals(config.getPreconditionLanguage())) { + throw new IllegalArgumentException("SQL filters are not supported with " + + "multiple input stages. Please ensure the Wrangler stages with SQL " + + "filters have only one input."); + } + long start = 0; List records;