Skip to content

Commit

Permalink
Test consumer without event flattening
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Jun 15, 2024
1 parent 5fee360 commit b91706c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@ private Schema icebergSchema() {
//// NOTE! because while for insert events only `after` field is populated for delete events only `before` field is populated!
//// NOTE! because of this inconsistency we cannot set either of the filed as key field!
//// // NOTE: events re not unwrapped, align schema with event schema, so then we can scan event and key schemas synchronously
ObjectNode nestedKeySchema = mapper.createObjectNode();
nestedKeySchema.put("type", "struct");
nestedKeySchema.putArray("fields").add(((ObjectNode) keySchema).put("field", "after"));
icebergSchemaFields(valueSchema, nestedKeySchema, schemaData);
//// ObjectNode nestedKeySchema = mapper.createObjectNode();
//// nestedKeySchema.put("type", "struct");
//// nestedKeySchema.putArray("fields").add(((ObjectNode) keySchema).put("field", "after"));
//// icebergSchemaFields(valueSchema, nestedKeySchema, schemaData);
// @TODO raise error
//icebergSchemaFields(valueSchema, null, schemaData);
icebergSchemaFields(valueSchema, null, schemaData);
} else {
icebergSchemaFields(valueSchema, keySchema, schemaData);
}
Expand Down

0 comments on commit b91706c

Please sign in to comment.