Skip to content

Commit

Permalink
[SEDONA-662] remove dead code from dbscan code (#1622)
Browse files Browse the repository at this point in the history
Co-authored-by: jameswillis <[email protected]>
  • Loading branch information
james-willis and jameswillis authored Oct 12, 2024
1 parent f5faea4 commit 1fbac22
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion python/sedona/stats/clustering/dbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from pyspark.sql import DataFrame, SparkSession

ID_COLUMN_NAME = "__id"
DEFAULT_MAX_SAMPLE_SIZE = 1000000 # 1 million


def dbscan(
Expand Down
1 change: 0 additions & 1 deletion python/tests/stats/test_dbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import pyspark.sql.functions as f
import pytest

from itertools import product
from sedona.sql.st_constructors import ST_MakePoint
from sedona.sql.st_functions import ST_Buffer
from sklearn.cluster import DBSCAN as sklearnDBSCAN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.apache.sedona.stats.Util.getGeometryColumnName
import org.apache.spark.sql.functions._
import org.apache.spark.sql.sedona_sql.UDT.GeometryUDT
import org.apache.spark.sql.sedona_sql.expressions.st_functions.{ST_Distance, ST_DistanceSpheroid}
import org.apache.spark.sql.{Column, DataFrame, SparkSession}
import org.apache.spark.sql.{Column, DataFrame}
import org.graphframes.GraphFrame

object DBSCAN {
Expand Down Expand Up @@ -60,9 +60,6 @@ object DBSCAN {
includeOutliers: Boolean = true,
useSpheroid: Boolean = false): DataFrame = {

// We want to disable broadcast joins because the broadcast reference were using too much driver memory
val spark = SparkSession.getActiveSession.get

val geometryCol = geometry match {
case null => getGeometryColumnName(dataframe)
case _ => geometry
Expand Down

0 comments on commit 1fbac22

Please sign in to comment.