Skip to content

Commit

Permalink
[bugfix][hbase]fix hbase date type (#1406)
Browse files Browse the repository at this point in the history
Co-authored-by: linchen <linchen@dtstack.com>
(cherry picked from commit 703f79c)
  • Loading branch information
fangxy-7010 authored and OT-XY committed Mar 3, 2023
1 parent 1198c92 commit d863ff6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,12 @@ protected ISerializationConverter<Mutation> createExternalConverter(LogicalType
((Put) output).addColumn(qualifier[0], qualifier[1], bytes);
};
case DATE:
return (rowData, pos, output) -> {
String value = ((ColumnRowData) rowData).getField(pos).asSqlDate().toString();
byte[] bytes = Bytes.toBytes(value);
byte[][] qualifier = familyAndQualifier[pos];
((Put) output).addColumn(qualifier[0], qualifier[1], bytes);
};
case INTERVAL_YEAR_MONTH:
case INTEGER:
return (rowData, pos, output) -> {
Expand Down

0 comments on commit d863ff6

Please # to comment.