Skip to content

Commit

Permalink
[Bugfix]fix clickhouse source connector read Nullable() type is not n…
Browse files Browse the repository at this point in the history
…ull,example:Nullable(Float64) while value is null the result is 0.0 (#5080)
  • Loading branch information
gaopeng666 authored Jul 14, 2023
1 parent 53faa5f commit cf3d0bb
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,14 @@ record -> {
Object[] values =
new Object[this.rowTypeInfo.getFieldNames().length];
for (int i = 0; i < record.size(); i++) {
values[i] =
TypeConvertUtil.valueUnwrap(
this.rowTypeInfo.getFieldType(i),
record.getValue(i));
if (record.getValue(i).isNullOrEmpty()) {
values[i] = null;
} else {
values[i] =
TypeConvertUtil.valueUnwrap(
this.rowTypeInfo.getFieldType(i),
record.getValue(i));
}
}
output.collect(new SeaTunnelRow(values));
});
Expand Down

0 comments on commit cf3d0bb

Please sign in to comment.