Skip to content

Commit 56b3e4e

Browse files
committed
SPARK-29249: DataFrameWriterV2: Don't allow tableProperty for existing tables.
1 parent a1b90bf commit 56b3e4e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ final class DataFrameWriterV2[T] private[sql](table: String, ds: Dataset[T])
8989
this
9090
}
9191

92-
override def tableProperty(property: String, value: String): DataFrameWriterV2[T] = {
92+
override def tableProperty(property: String, value: String): CreateTableWriter[T] = {
9393
this.properties.put(property, value)
9494
this
9595
}

sql/core/src/test/java/test/org/apache/spark/sql/JavaDataFrameWriterV2Suite.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,18 @@ public void dropTestTable() {
5757
public void testAppendAPI() throws NoSuchTableException {
5858
df().writeTo("testcat.t").append();
5959
df().writeTo("testcat.t").option("property", "value").append();
60-
df().writeTo("testcat.t").tableProperty("property", "value").append();
6160
}
6261

6362
@Test
6463
public void testOverwritePartitionsAPI() throws NoSuchTableException {
6564
df().writeTo("testcat.t").overwritePartitions();
6665
df().writeTo("testcat.t").option("property", "value").overwritePartitions();
67-
df().writeTo("testcat.t").tableProperty("property", "value").overwritePartitions();
6866
}
6967

7068
@Test
7169
public void testOverwriteAPI() throws NoSuchTableException {
7270
df().writeTo("testcat.t").overwrite(lit(true));
7371
df().writeTo("testcat.t").option("property", "value").overwrite(lit(true));
74-
df().writeTo("testcat.t").tableProperty("property", "value").overwrite(lit(true));
7572
}
7673

7774
@Test

0 commit comments

Comments
 (0)