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:35:30 UTC

[kafka] branch 2.2 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.2
in repository https://gitbox.apache.org/repos/asf/kafka.git


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

commit fd4512fa7167630aac979d97d9871d0c6b815a78
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 + ").");
             }
         }
     }