diff --git a/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala b/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala index ca27dcebb0a77..17782e8ab1f0d 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala @@ -89,7 +89,7 @@ final class DataFrameWriterV2[T] private[sql](table: String, ds: Dataset[T]) this } - override def tableProperty(property: String, value: String): DataFrameWriterV2[T] = { + override def tableProperty(property: String, value: String): CreateTableWriter[T] = { this.properties.put(property, value) this } diff --git a/sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameWriterV2Suite.java b/sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameWriterV2Suite.java index 72f2e8f185637..e418958bef94d 100644 --- a/sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameWriterV2Suite.java +++ b/sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameWriterV2Suite.java @@ -57,21 +57,18 @@ public void dropTestTable() { public void testAppendAPI() throws NoSuchTableException { df().writeTo("testcat.t").append(); df().writeTo("testcat.t").option("property", "value").append(); - df().writeTo("testcat.t").tableProperty("property", "value").append(); } @Test public void testOverwritePartitionsAPI() throws NoSuchTableException { df().writeTo("testcat.t").overwritePartitions(); df().writeTo("testcat.t").option("property", "value").overwritePartitions(); - df().writeTo("testcat.t").tableProperty("property", "value").overwritePartitions(); } @Test public void testOverwriteAPI() throws NoSuchTableException { df().writeTo("testcat.t").overwrite(lit(true)); df().writeTo("testcat.t").option("property", "value").overwrite(lit(true)); - df().writeTo("testcat.t").tableProperty("property", "value").overwrite(lit(true)); } @Test