Skip to content

Commit

Permalink
Patch for Glue Command
Browse files Browse the repository at this point in the history
  • Loading branch information
dkapoor committed Sep 18, 2014
1 parent 0fcee3f commit 38eaf4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ public JSONObject getCommandJSON(Workspace workspace, ICommand comm) {
JSONArray hnodes = (JSONArray) JSONUtil.createJson(inpP.getString(ClientJsonKeys.value.name()));
for (int j = 0; j < hnodes.length(); j++) {
JSONObject obj = (JSONObject)hnodes.get(j);
String hNodeId = obj.getString(ClientJsonKeys.value.name());
HNode node = workspace.getFactory().getHNode(hNodeId);
JSONArray hNodeRepresentation = node.getJSONArrayRepresentation(workspace.getFactory());
obj.put(ClientJsonKeys.value.name(), hNodeRepresentation);
Object value = obj.get(ClientJsonKeys.value.name());
if (value instanceof String) {
String hNodeId = (String) value;
HNode node = workspace.getFactory().getHNode(hNodeId);
JSONArray hNodeRepresentation = node.getJSONArrayRepresentation(workspace.getFactory());
obj.put(ClientJsonKeys.value.name(), hNodeRepresentation);
}
}
inpP.put(ClientJsonKeys.value.name(), hnodes);
} else if(HistoryJsonUtil.getParameterType(inpP) == ParameterType.orderedColumns) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ public UpdateContainer normalizeCommandHistoryJsonInput(Workspace workspace, Str
HTable hTable = workspace.getWorksheet(worksheetId).getHeaders();
for (int i = 0; i < inputArr.length(); i++) {
JSONObject inpP = inputArr.getJSONObject(i);

if (inpP.getString(ClientJsonKeys.name.name()).equals("outputColumns") || inpP.getString(ClientJsonKeys.name.name()).equals("inputColumns"))
continue;
/*** Check the input parameter type and accordingly make changes ***/
if(HistoryJsonUtil.getParameterType(inpP) == ParameterType.hNodeId) {
JSONArray hNodeJSONRep = new JSONArray(inpP.get(ClientJsonKeys.value.name()).toString());
Expand Down

0 comments on commit 38eaf4f

Please sign in to comment.