Skip to contents

Return a new SparkDataFrame containing rows only in both this SparkDataFrame and another SparkDataFrame. This is equivalent to INTERSECT in SQL.

Usage

intersect(x, y)

# S4 method for class 'SparkDataFrame,SparkDataFrame'
intersect(x, y)

Arguments

x

A SparkDataFrame

y

A SparkDataFrame

Value

A SparkDataFrame containing the result of the intersect.

Note

intersect since 1.4.0

Examples

if (FALSE) { # \dontrun{
sparkR.session()
df1 <- read.json(path)
df2 <- read.json(path2)
intersectDF <- intersect(df, df2)
} # }