This is an automated email from the ASF dual-hosted git repository.

kkarantasis pushed a commit to branch 1.0
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/1.0 by this push:
     new 2264436  MINOR: Fix error message in exception when records have 
schemas in Connect's Flatten transformation (#3982)
2264436 is described below

commit 226443608ae764b6da78945bc4664405704d1fd4
Author: Svend Vanderveken <[email protected]>
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 <[email protected]>, Konstantine Karantasis 
<[email protected]>
---
 .../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 + ").");
             }
         }
     }

Reply via email to