Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
QiangCai committed Sep 3, 2018
1 parent dd7ec00 commit b9aa271
Showing 1 changed file with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,14 @@ public BinaryFieldConverterImpl(DataField dataField, String nullformat, int inde
this.isEmptyBadRecord = isEmptyBadRecord;
this.dataField = dataField;
}
@Override public void convert(CarbonRow row, BadRecordLogHolder logHolder)
@Override
public void convert(CarbonRow row, BadRecordLogHolder logHolder)
throws CarbonDataLoadingException {
String value = row.getString(index);
if (value != null) {
try {
byte[] bytes = Hex.decodeHex(value.toCharArray());
row.update(bytes, index);
} catch (DecoderException e) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Can not convert value to Binary type value. Value considered as null.");
}
logHolder.setReason(
CarbonDataProcessorUtil.prepareFailureReason(measure.getColName(), dataType));
row.update(null, index);
}
}
row.update(convert(row.getString(index), logHolder), index);
}

@Override public Object convert(Object value, BadRecordLogHolder logHolder)
@Override
public Object convert(Object value, BadRecordLogHolder logHolder)
throws RuntimeException {
String literalValue = (String) (value);
if (literalValue != null) {
Expand All @@ -85,6 +74,7 @@ public BinaryFieldConverterImpl(DataField dataField, String nullformat, int inde
return null;
}

@Override public void clear() {
@Override
public void clear() {
}
}

0 comments on commit b9aa271

Please sign in to comment.