Skip to content

Commit

Permalink
Merge pull request #669 from brightics/brtc-issue-668
Browse files Browse the repository at this point in the history
Support Enterprise version of UDF
  • Loading branch information
krazyeom committed Oct 2, 2019
2 parents b68cacf + 5aa9d86 commit 0a9f2af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -91,6 +91,18 @@ PythonScriptBuilder addInputsScript() {

return this;
}

PythonScriptBuilder addInputsUDFScript() {
DataAttribute inputs = message.getInputs();

for (Entry<String, Collection<String>> entry : inputs.entrySetAsIterableValue()) {
script.add(entry.getValue().stream().
map(this::makeDataLoadScript).
collect(Collectors.joining(", ", String.format("%s = ", entry.getKey()), " ")));
}

return this;
}

PythonScriptBuilder addOutDataScript() {
String[] outDatas = message.getOutData();
Expand Down
Expand Up @@ -59,7 +59,7 @@ public String getSource(TaskMessageWrapper message) {
@Override
public String getSource(TaskMessageWrapper message) {
return scriptBuilder(message).
addInputsScript().
addInputsUDFScript().
addParameters().
addScript().
addPutOutputsScript().
Expand Down

0 comments on commit 0a9f2af

Please sign in to comment.