Skip to content

Commit

Permalink
HOP-2500 : Show last rows widget is showing incorrect data
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcasters committed Feb 5, 2021
1 parent 31ad2e4 commit d93fa01
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -30,6 +30,7 @@
import org.apache.hop.core.action.GuiContextAction;
import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.exception.HopTransformException;
import org.apache.hop.core.exception.HopValueException;
import org.apache.hop.core.extension.ExtensionPointHandler;
import org.apache.hop.core.extension.HopExtensionPoint;
import org.apache.hop.core.gui.AreaOwner;
Expand Down Expand Up @@ -4143,6 +4144,16 @@ public void rowWrittenEvent(IRowMeta rowMeta, Object[] row)
}
}

// Clone the row to make sure we capture the correct values
//
if (sampleType != SampleType.None) {
try {
row = rowMeta.cloneRow(row);
} catch (HopValueException e) {
throw new HopTransformException("Error copying row for preview purposes", e);
}
}

switch (sampleType) {
case First:
{
Expand Down

0 comments on commit d93fa01

Please sign in to comment.