Skip to content

Commit

Permalink
[hotfix] Add enableUpsertDelete back to StreamLoadTableProperties (#299)
Browse files Browse the repository at this point in the history
Signed-off-by: PengFei Li <[email protected]>
  • Loading branch information
banmoy authored Oct 29, 2023
1 parent aaa02bd commit 74ce00e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class StreamLoadTableProperties implements Serializable {
private final String table;
private final StreamLoadDataFormat dataFormat;
private final Map<String, String> properties;
private final boolean enableUpsertDelete;
private final long chunkLimit;
private final int maxBufferRows;
private final String columns;
Expand All @@ -50,6 +51,7 @@ private StreamLoadTableProperties(Builder builder) {
? StreamLoadDataFormat.JSON
: builder.dataFormat;

this.enableUpsertDelete = builder.enableUpsertDelete;
if (dataFormat instanceof StreamLoadDataFormat.JSONFormat) {
chunkLimit = Math.min(3221225472L, builder.chunkLimit);
} else {
Expand All @@ -74,6 +76,10 @@ public String getTable() {
return table;
}

public boolean isEnableUpsertDelete() {
return enableUpsertDelete;
}

public StreamLoadDataFormat getDataFormat() {
return dataFormat;
}
Expand All @@ -99,6 +105,7 @@ public static class Builder {
private String database;
private String table;
private String columns;
private boolean enableUpsertDelete;
private StreamLoadDataFormat dataFormat;
private long chunkLimit;
private int maxBufferRows = Integer.MAX_VALUE;
Expand Down Expand Up @@ -148,6 +155,11 @@ public Builder columns(String columns) {
return this;
}

public Builder enableUpsertDelete(boolean enableUpsertDelete) {
this.enableUpsertDelete = enableUpsertDelete;
return this;
}

public Builder streamLoadDataFormat(StreamLoadDataFormat dataFormat) {
this.dataFormat = dataFormat;
return this;
Expand Down

0 comments on commit 74ce00e

Please sign in to comment.