-
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
Conversation
Signed-off-by: Zaorang Yang <zaorangy@gmail.com>
@@ -174,6 +174,17 @@ public StreamLoadTableProperties getTableProperties(String uniqueKey) { | |||
return tablePropertiesMap.getOrDefault(uniqueKey, defaultTableProperties); | |||
} |
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)
and getTableProperties(String uniqueKey)
to avoid misusing
columns(streamLoadTableProperties.getColumns()); | ||
enableUpsertDelete(streamLoadTableProperties.isEnableUpsertDelete()); |
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.
columns
and upsertDelete
may be different for different tables, so it's better not to copy them?
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
only db
, table
, and columns
are populated in the build process. What about other properties such as timeout
Signed-off-by: Zaorang Yang <zaorangy@gmail.com>
Signed-off-by: Zaorang Yang <zaorangy@gmail.com>
Signed-off-by: Zaorang Yang <zaorangy@gmail.com>
What type of PR is this:
Which issues of this PR fixes :
Fixes #
Problem Summary(Required) :
For the Stream Load SDK, if the table to be written to is a non-default table, the DefaultStreamLoader.send method still requests SR to write data to the default table, causing the stream load job to fail. This PR fixes this issue.
Checklist: