Skip to content

Commit c7e76d9

Browse files
committed
[PLUGIN-1572] Added error message when Wrangler uses SQL filters and the wrangler stage has more than 1 inputs
1 parent eb36cc0 commit c7e76d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wrangler-transform/src/main/java/io/cdap/wrangler/Wrangler.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,15 @@ public void destroy() {
381381
*/
382382
@Override
383383
public void transform(StructuredRecord input, Emitter<StructuredRecord> emitter) throws Exception {
384+
// The Transform function should never execute if SQL filters are enabled. SQL filters are
385+
// handled by the LinearRelationalTransform implementation. If this code is reached, it means
386+
// the LinearRelationalTransform could not be executed correctly.
387+
if (PRECONDITION_LANGUAGE_SQL.equals(config.getPreconditionLanguage())) {
388+
throw new IllegalArgumentException("SQL filters are not supported with "
389+
+ "multiple input stages. Please ensure the Wrangler stages with SQL "
390+
+ "filters have only one input.");
391+
}
392+
384393
long start = 0;
385394
List<StructuredRecord> records;
386395

0 commit comments

Comments
 (0)