Package org.apache.spark.sql
Class WhenMatched<T>
Object
org.apache.spark.sql.WhenMatched<T>
- Type Parameters:
T
- The type of data in the MergeIntoWriter.
- All Implemented Interfaces:
Serializable
,scala.Equals
,scala.Product
A class for defining actions to be taken when matching rows in a DataFrame during
a merge operation.
param: mergeIntoWriter The MergeIntoWriter instance responsible for writing data to a target DataFrame. param: condition An optional condition Expression that specifies when the actions should be applied. If the condition is None, the actions will be applied to all matched rows.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionscala.Option<org.apache.spark.sql.catalyst.expressions.Expression>
delete()
Specifies an action to delete matched rows from the DataFrame.Specifies an action to update matched rows in the DataFrame with the provided column assignments.Specifies an action to update all matched rows in the DataFrame.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Method Details
-
mergeIntoWriter
-
condition
public scala.Option<org.apache.spark.sql.catalyst.expressions.Expression> condition() -
updateAll
Specifies an action to update all matched rows in the DataFrame.- Returns:
- The MergeIntoWriter instance with the update all action configured.
-
update
Specifies an action to update matched rows in the DataFrame with the provided column assignments.- Parameters:
map
- A Map of column names to Column expressions representing the updates to be applied.- Returns:
- The MergeIntoWriter instance with the update action configured.
-
delete
Specifies an action to delete matched rows from the DataFrame.- Returns:
- The MergeIntoWriter instance with the delete action configured.
-