-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] Fix SDK write failure for non-default tables #298
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ public class StreamLoadTableProperties implements Serializable { | |
private final boolean enableUpsertDelete; | ||
private final long chunkLimit; | ||
private final int maxBufferRows; | ||
private final String columns; | ||
|
||
private StreamLoadTableProperties(Builder builder) { | ||
this.database = builder.database; | ||
|
@@ -59,8 +60,11 @@ private StreamLoadTableProperties(Builder builder) { | |
} | ||
this.maxBufferRows = builder.maxBufferRows; | ||
this.properties = builder.properties; | ||
this.columns = builder.columns; | ||
} | ||
|
||
public String getColumns() {return columns; } | ||
|
||
public String getUniqueKey() { | ||
return uniqueKey; | ||
} | ||
|
@@ -114,6 +118,20 @@ private Builder() { | |
|
||
} | ||
|
||
// This function does not copy the uniqueKey and properties attributes because the uniqueKey | ||
// is generated in the StreamLoadTableProperties constructor, and the properties are automatically | ||
// populated during the build process. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only |
||
public Builder copyFrom(StreamLoadTableProperties streamLoadTableProperties) { | ||
database(streamLoadTableProperties.getDatabase()); | ||
table(streamLoadTableProperties.getTable()); | ||
columns(streamLoadTableProperties.getColumns()); | ||
enableUpsertDelete(streamLoadTableProperties.isEnableUpsertDelete()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
streamLoadDataFormat(streamLoadTableProperties.getDataFormat()); | ||
chunkLimit(streamLoadTableProperties.getChunkLimit()); | ||
maxBufferRows(streamLoadTableProperties.getMaxBufferRows()); | ||
return this; | ||
} | ||
|
||
public Builder uniqueKey(String uniqueKey) { | ||
this.uniqueKey = uniqueKey; | ||
return this; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove
getTableProperties(String database, String table)
andgetTableProperties(String uniqueKey)
to avoid misusing