-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 10.0.5
-
Component/s: None
-
None
The partitionner fails when manipulating an empty collection:
Caused by: org.bson.BsonInvalidOperationException: Document does not contain key avgObjSize at org.bson.BsonDocument.throwIfKeyAbsent(BsonDocument.java:884) at org.bson.BsonDocument.getNumber(BsonDocument.java:178) at com.mongodb.spark.sql.connector.read.partitioner.SamplePartitioner.generatePartitions(SamplePartitioner.java:115) at com.mongodb.spark.sql.connector.read.partitioner.PartitionerHelper.generatePartitions(PartitionerHelper.java:54)
The same problem existed and was solved on the 3.x connector, but the correction seems to be missing on the 10.x