Skip to content

Commit 0a5de3c

Browse files
committed
added select to make original order
1 parent f0c8c7e commit 0a5de3c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

common/client/src/main/java/zingg/common/client/util/DSUtil.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,16 @@ public ZFrame<D,R,C> postProcessLabel(ZFrame<D,R,C> updatedLabelledRecords, ZFra
272272
List<C> cols = new ArrayList<C>();
273273
cols.add(updatedLabelledRecords.col(ColName.ID_COL));
274274

275+
String[] unmarkedRecordColumns = unmarkedRecords.columns();
276+
275277
//drop isMatch column from unMarked records
276278
//and replace with updated isMatch column
277279
cols.add(updatedLabelledRecords.col(ColName.MATCH_FLAG_COL));
278280
ZFrame<D,R,C> zFieldsFromUpdatedLabelledRecords = updatedLabelledRecords.select(cols);
279281
unmarkedRecords = unmarkedRecords.drop(ColName.MATCH_FLAG_COL);
280-
return unmarkedRecords.joinOnCol(zFieldsFromUpdatedLabelledRecords, ColName.ID_COL);
282+
283+
//we are selecting columns to bring back to original shape
284+
return unmarkedRecords.joinOnCol(zFieldsFromUpdatedLabelledRecords, ColName.ID_COL).select(unmarkedRecordColumns);
281285
}
282286

283287

common/client/src/main/java/zingg/common/client/util/vertical/VerticalDisplayUtility.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public ZFrame<D, R, C> convertVertical(ZFrame<D, R, C> zFrame) throws ZinggClien
4242
//and create model list
4343
List<VerticalDisplayModel> samples = new ArrayList<>();
4444
for (String column : columns) {
45-
samples.add(new VerticalDisplayTwoRowModel(column, getString(zFrame.getAsString(row1, column)),
46-
getString(zFrame2.getAsString(row2, column))));
45+
samples.add(new VerticalDisplayTwoRowModel(column, getString(zFrame.get(row1, column)),
46+
getString(zFrame2.get(row2, column))));
4747
}
4848
return dfObjectUtil.getDFFromObjectList(samples, VerticalDisplayTwoRowModel.class);
4949
} catch (Exception exception) {

0 commit comments

Comments
 (0)