Add additional condition for edge filtering

This if for a better logic for implementing the DBSCAN in spark.