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>
  • Loading branch information
fangxy-7010 and linchen authored Nov 20, 2022
1 parent fd449ca commit 703f79c
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 703f79c

Please sign in to comment.