fullJoinWith

fun <A, B> DataFrame<A>.fullJoinWith(right: DataFrame<B>, joinExpression: JoinExpression<A, B>): DataFrame<A>

Performs a full join of this DataFrame with the right DataFrame using the provided joinExpression. Includes all rows from both DataFrames; matching rows are merged, all mismatches are filled with null.

This is a shortcut for joinWith with JoinType.Full.

A JoinExpression defines the matching condition between rows of the two DataFrames. It provides access to row values from both the left and right DataFrames and expects a Boolean result indicating whether the rows match. All combinations of rows from the left and right DataFrame that satisfy this condition are matched.

This method is useful when rows should be matched based on custom logic rather than simple value equality.

Creates a new DataFrame by combining rows from both inputs according to the joinExpression matching rule.

See also general joinWith as well as other shortcuts with each of join types: leftJoinWith, rightJoinWith, innerJoinWith, filterJoinWith, excludeJoinWith.

See also join, which performs a join by exact value equality in the selected columns.

This can include column groups and nested columns.

For more information, See joinWith on the documentation website..

Examples

// Join rows where the `fullName` value in the left `DataFrame`
// contains the `firstName` value in the right `DataFrame`.
dfLeft.joinWith(dfRight) { left -> left.fullName.contains(right.firstName) }

// Join rows where the `date` value in the right `DataFrame`
// falls within the interval defined by the `startDate` and `endDate`
// values in the left `DataFrame`.
dfLeft.joinWith(dfRight) { right.date in startDate..endDate }

// String API; join rows where `score` value in the left `DataFrame` is higher than 3.4
// and the `passed` value in the right `DataFrame` is `true`.
dfLeft.joinWith(dfRight) { "score"<Int>() > 3.4 && right["passed"] as Boolean }

Return

joined DataFrame.

Parameters

right

DataFrame to join with.

joinExpression

JoinExpression specifying the rows join condition.