Skip to content

Commit adf26c2

Browse files
loustlerDongyeon
andauthored
[Improve][Connector-V2][MongoDB] A BsonInt32 will be convert to a long type (#7567)
Co-authored-by: Dongyeon <loustler@naverz-corp.com>
1 parent 9a603ea commit adf26c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/serde/BsonToRowDataConverters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ private static byte[] convertToBinary(BsonValue bsonValue) {
401401
}
402402

403403
private static long convertToLong(BsonValue bsonValue) {
404-
if (bsonValue.isInt64()) {
404+
if (bsonValue.isInt64() || bsonValue.isInt32()) {
405405
return bsonValue.asNumber().longValue();
406406
}
407407
throw new MongodbConnectorException(

0 commit comments

Comments
 (0)