Skip to content

Commit

Permalink
DBZ-8496 Make Connector schema snapshot field consist with SnapshotRe…
Browse files Browse the repository at this point in the history
…cord Enum
  • Loading branch information
fanyang authored and mfvitale committed Dec 10, 2024
1 parent 36d3f9a commit e89db6e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package io.debezium.connector;

import java.time.Instant;
import java.util.Arrays;
import java.util.Objects;

import org.apache.kafka.connect.data.Schema;
Expand All @@ -24,7 +25,9 @@
*/
public abstract class AbstractSourceInfoStructMaker<T extends AbstractSourceInfo> implements SourceInfoStructMaker<T> {

public static final Schema SNAPSHOT_RECORD_SCHEMA = Enum.builder("true,last,false,incremental").defaultValue("false").optional().build();
public static final Schema SNAPSHOT_RECORD_SCHEMA = Enum.builder(
String.join(",", Arrays.stream(SnapshotRecord.values()).map(java.lang.Enum::name).map(String::toLowerCase).toList()))
.defaultValue(SnapshotRecord.FALSE.name().toLowerCase()).optional().build();

private String version;
private String connector;
Expand Down

0 comments on commit e89db6e

Please sign in to comment.