Kontinuation commented on issue #876: URL: https://github.com/apache/sedona/issues/876#issuecomment-1611328794
`countWithoutDuplicates` was [implemented in a very dumb way](https://github.com/apache/sedona/blob/sedona-1.4.1/core/src/main/java/org/apache/sedona/core/spatialRDD/SpatialRDD.java#L371-L380): it collects the entire RDD in the driver node and then does the deduplication. I suggest using `rdd.get_srdd().getRawSpatialRDD().distinct().count()` as a workaround. By the way, `spark.kryoserializer.buffer.max` [cannot be larger than 2GB](https://github.com/apache/spark/blob/v3.4.1/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala#L67-L78). I'm not sure why no exception was raised when creating spark session with spark.kryoserializer.buffer.max=50g. -- 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]
