You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/03/29 04:36:24 UTC
[kafka] branch 2.0 updated: MINOR: Fix error message in exception
when records have schemas in Connect's Flatten transformation (#3982)
This is an automated email from the ASF dual-hosted git repository.
kkarantasis pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.0 by this push:
new a11d6a5 MINOR: Fix error message in exception when records have schemas in Connect's Flatten transformation (#3982)
a11d6a5 is described below
commit a11d6a5216f2b26620cee3598fc705c3ed343e8e
Author: Svend Vanderveken <12...@users.noreply.github.com>
AuthorDate: Sun Mar 29 06:28:06 2020 +0200
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 <ko...@confluent.io>
---
.../src/main/java/org/apache/kafka/connect/transforms/Flatten.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/Flatten.java b/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/Flatten.java
index d7d2144..42528e2 100644
--- a/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/Flatten.java
+++ b/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
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
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 + ").");
}
}
}