Browse Source

MINOR: Fix error message in exception when records have schemas in Connect's Flatten transformation (#3982)

In case of an error while flattening a record with schema, the Flatten transformation was reporting an error about a record without schema, as follows: 

```
org.apache.kafka.connect.errors.DataException: Flatten transformation does not support ARRAY for record without schemas (for field ...)
```

The expected behaviour would be an error message specifying "with schemas". 

This looks like a simple copy/paste typo from the schemaless equivalent methods, in the same file 

Reviewers: Ewen Cheslack-Postava <me@ewencp.org>, Konstantine Karantasis <konstantine@confluent.io>
1.0
Svend Vanderveken 5 years ago committed by Konstantine Karantasis
parent
commit
226443608a
  1. 4
      connect/transforms/src/main/java/org/apache/kafka/connect/transforms/Flatten.java

4
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/Flatten.java

@ -194,7 +194,7 @@ public abstract class Flatten<R extends ConnectRecord<R>> implements Transformat @@ -194,7 +194,7 @@ public abstract class Flatten<R extends ConnectRecord<R>> implements Transformat
break;
default:
throw new DataException("Flatten transformation does not support " + field.schema().type()
+ " for record without schemas (for field " + fieldName + ").");
+ " for record with schemas (for field " + fieldName + ").");
}
}
}
@ -242,7 +242,7 @@ public abstract class Flatten<R extends ConnectRecord<R>> implements Transformat @@ -242,7 +242,7 @@ public abstract class Flatten<R extends ConnectRecord<R>> implements Transformat
break;
default:
throw new DataException("Flatten transformation does not support " + field.schema().type()
+ " for record without schemas (for field " + fieldName + ").");
+ " for record with schemas (for field " + fieldName + ").");
}
}
}

Loading…
Cancel
Save