Skip to content
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

debug:Delete the useless parseSinkStreamLoadProperties method #329

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public enum StreamLoadFormat {

private final ReadableConfig tableOptions;
private final Map<String, String> streamLoadProps = new HashMap<>();
private final Map<String, String> tableOptionsMap;
private StarRocksSinkSemantic sinkSemantic;
private boolean supportUpsertDelete;
private String[] tableSchemaFieldNames;
Expand All @@ -175,10 +174,8 @@ public enum StreamLoadFormat {

private final List<StreamLoadTableProperties> tablePropertiesList = new ArrayList<>();

public StarRocksSinkOptions(ReadableConfig options, Map<String, String> optionsMap) {
public StarRocksSinkOptions(ReadableConfig options) {
this.tableOptions = options;
this.tableOptionsMap = optionsMap;
parseSinkStreamLoadProperties();
this.validate();
}

Expand Down Expand Up @@ -459,16 +456,6 @@ private void validateRequired() {
"Either all or none of the following options should be provided:\n" + String.join("\n", propertyNames));
}

private void parseSinkStreamLoadProperties() {
tableOptionsMap.keySet().stream()
.filter(key -> key.startsWith(SINK_PROPERTIES_PREFIX))
.forEach(key -> {
final String value = tableOptionsMap.get(key);
final String subKey = key.substring((SINK_PROPERTIES_PREFIX).length()).toLowerCase();
streamLoadProps.put(subKey, value);
});
}

/**
* Builder for {@link StarRocksSinkOptions}.
*/
Expand All @@ -484,7 +471,7 @@ public Builder withProperty(String key, String value) {
}

public StarRocksSinkOptions build() {
return new StarRocksSinkOptions(conf, conf.toMap());
return new StarRocksSinkOptions(conf);
}
}

Expand Down