Skip to contents

Return a new SparkDataFrame marked as small enough for use in broadcast joins.

Usage

broadcast(x)

# S4 method for class 'SparkDataFrame'
broadcast(x)

Arguments

x

a SparkDataFrame.

Value

a SparkDataFrame.

Details

Equivalent to hint(x, "broadcast").

Note

broadcast since 2.3.0

Examples

if (FALSE) { # \dontrun{
df <- createDataFrame(mtcars)
avg_mpg <- mean(groupBy(createDataFrame(mtcars), "cyl"), "mpg")

head(join(df, broadcast(avg_mpg), df$cyl == avg_mpg$cyl))
} # }