diff --git a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/CheckConnectJvmClientCompatibility.scala b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/CheckConnectJvmClientCompatibility.scala index 616ff0d5f21b9..f4043f19eb6ac 100644 --- a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/CheckConnectJvmClientCompatibility.scala +++ b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/CheckConnectJvmClientCompatibility.scala @@ -303,10 +303,7 @@ object CheckConnectJvmClientCompatibility { ProblemFilters.exclude[DirectMissingMethodProblem]( "org.apache.spark.sql.DataFrameReader.validateJsonSchema"), ProblemFilters.exclude[DirectMissingMethodProblem]( - "org.apache.spark.sql.DataFrameReader.validateXmlSchema"), - - // Update Writer - ProblemFilters.exclude[MissingMethodProblem]("org.apache.spark.sql.SparkSession.update")) + "org.apache.spark.sql.DataFrameReader.validateXmlSchema")) checkMiMaCompatibility(clientJar, sqlJar, includedRules, excludeRules) } diff --git a/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala b/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala index 4871361a63543..78c154959270d 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala @@ -1656,13 +1656,12 @@ class Dataset[T] private[sql]( } /** - * Update rows in a table. + * Update rows in a table. Only applies to Datasets that are direct table scans. * * Scala Example: * {{{ * spark.table("source") * .update(Map("salary" -> lit(200))) - * .execute() * }}} * @param assignments A Map of column names to Column expressions representing the updates * to be applied. @@ -1674,13 +1673,13 @@ class Dataset[T] private[sql]( } /** - * Update rows in a table that match a condition. + * Update rows in a table that match a condition. Only applies to Datasets that are + * direct table scans. * * Scala Example: * {{{ * spark.table("source") * .update(Map("salary" -> lit(200)), $"salary" === 100) - * .execute() * }}} * @param assignments A Map of column names to Column expressions representing the updates * to be applied. @@ -1688,7 +1687,9 @@ class Dataset[T] private[sql]( * @group basic * @since 4.0.0 */ - def update(assignments: Map[String, Column], condition: Column): Unit = { + def update( + assignments: Map[String, Column], + condition: Column): Unit = { updateInternal(assignments, Some(condition)) }