diff --git a/src/main/java/com/snowflake/kafka/connector/records/RecordService.java b/src/main/java/com/snowflake/kafka/connector/records/RecordService.java index 4fccf8eef..0d8a5f7bc 100644 --- a/src/main/java/com/snowflake/kafka/connector/records/RecordService.java +++ b/src/main/java/com/snowflake/kafka/connector/records/RecordService.java @@ -523,7 +523,7 @@ else if (value instanceof ByteBuffer) { case STRUCT: { Struct struct = (Struct) value; - if (struct.schema() != schema) + if (!struct.schema().equals(schema)) throw SnowflakeErrors.ERROR_5015.getException("Mismatching schema."); ObjectNode obj = JsonNodeFactory.instance.objectNode(); for (Field field : schema.fields()) {