%<=>% {SparkR}R Documentation

%<=>%

Description

Equality test that is safe for null values.

Usage

x %<=>% value

## S4 method for signature 'Column'
x %<=>% value

Arguments

x

a Column

value

a value to compare

Details

Can be used, unlike standard equality operator, to perform null-safe joins. Equivalent to Scala Column.<=> and Column.eqNullSafe.

Note

%<=>% since 2.3.0

Examples

## Not run: 
##D df1 <- createDataFrame(data.frame(
##D   x = c(1, NA, 3, NA), y = c(2, 6, 3, NA)
##D ))
##D 
##D head(select(df1, df1$x == df1$y, df1$x %<=>% df1$y))
##D 
##D df2 <- createDataFrame(data.frame(y = c(3, NA)))
##D count(join(df1, df2, df1$y == df2$y))
##D 
##D count(join(df1, df2, df1$y %<=>% df2$y))
## End(Not run)

[Package SparkR version 3.0.0 Index]