Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions core/src/main/scala/org/graphframes/GraphFrame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import org.apache.spark.sql.functions.expr
import org.apache.spark.sql.functions.lit
import org.apache.spark.sql.functions.monotonically_increasing_id
import org.apache.spark.sql.functions.struct
import org.apache.spark.sql.functions.udf
import org.apache.spark.sql.types._
import org.apache.spark.storage.StorageLevel
import org.graphframes.lib._
Expand Down Expand Up @@ -705,9 +704,7 @@ object GraphFrame extends Serializable with Logging {
a.join(b, joinCol)
} else {
logDebug(s"$logPrefix Skewed join with ${hubs.size} high-degree keys.")
val isHub = udf { id: T =>
hubs.contains(id)
}
val isHub = (c: Column) => c.isInCollection(hubs)
val hashJoined = a
.filter(!isHub(col(joinCol)))
.join(b.filter(!isHub(col(joinCol))), joinCol)
Expand Down