Skip to content

Commit

Permalink
fix #3100 "Type" in Database lookup does not change the incoming data…
Browse files Browse the repository at this point in the history
… type
  • Loading branch information
uraychang authored and hansva committed Nov 14, 2023
1 parent c596527 commit a34ea3d
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,6 @@ void determineFieldsTypesQueryingDb() throws HopException {
PKG, "DatabaseLookup.ERROR0001.FieldRequired6.Exception"));
}
}

final List<ReturnValue> returnFields = meta.getLookup().getReturnValues();
final int returnFieldsOffset = getInputRowMeta().size();
for (int i = 0; i < returnFields.size(); i++) {
ReturnValue returnValue = returnFields.get(i);
IValueMeta returnValueMeta = fields.searchValueMeta(returnValue.getTableField());
if (returnValueMeta != null) {
IValueMeta v = data.outputRowMeta.getValueMeta(returnFieldsOffset + i);
if (v.getType() != returnValueMeta.getType()) {
IValueMeta clone = returnValueMeta.clone();
clone.setName(v.getName());
data.outputRowMeta.setValueMeta(returnFieldsOffset + i, clone);
}
}
}
} else {
throw new HopTransformException(
BaseMessages.getString(PKG, "DatabaseLookup.ERROR0002.UnableToDetermineFieldsOfTable")
Expand Down

0 comments on commit a34ea3d

Please sign in to comment.