Hisoka-X commented on code in PR #7586:
URL: https://github.com/apache/seatunnel/pull/7586#discussion_r1744746397


##########
seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/source/split/SamplingSplitStrategy.java:
##########
@@ -108,7 +109,21 @@ private ImmutablePair<Long, Long> 
getDocumentNumAndAvgSize() {
                 
clientProvider.getDefaultCollection().getNamespace().getCollectionName();
         BsonDocument statsCmd = new BsonDocument("collStats", new 
BsonString(collectionName));
         Document res = 
clientProvider.getDefaultDatabase().runCommand(statsCmd);
-        long total = res.getInteger("count");
+        Object count = res.get("count");
+        long total =

Review Comment:
   ```suggestion
           // fix issue https://github.com/apache/seatunnel/issues/7575
           long total =
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to