Skip to content

Commit

Permalink
[Bug][Connectors-V2][XmlReadStrategy]The loss of digital precision of…
Browse files Browse the repository at this point in the history
… BIGINT and DECIMAL
  • Loading branch information
ShaunWuu committed Mar 11, 2024
1 parent be15f02 commit d5adc8c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ private Object convert(String fieldValue, SeaTunnelDataType<?> fieldType) {
case INT:
return (int) Double.parseDouble(fieldValue);
case BIGINT:
return (long) Double.parseDouble(fieldValue);
return new BigDecimal(fieldValue).longValue();
case DOUBLE:
return Double.parseDouble(fieldValue);
case FLOAT:
return (float) Double.parseDouble(fieldValue);
case DECIMAL:
return BigDecimal.valueOf(Double.parseDouble(fieldValue));
return new BigDecimal(fieldValue);
case BOOLEAN:
return Boolean.parseBoolean(fieldValue);
case BYTES:
Expand Down

0 comments on commit d5adc8c

Please sign in to comment.