Skip to contents

Specifies execution plan hint and return a new SparkDataFrame.

Usage

hint(x, name, ...)

# S4 method for class 'SparkDataFrame,character'
hint(x, name, ...)

Arguments

x

a SparkDataFrame.

name

a name of the hint.

...

optional parameters for the hint.

Value

A SparkDataFrame.

Note

hint since 2.2.0

Examples

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

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