You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2025/01/23 08:55:24 UTC
(spark) branch master updated: [MINOR][SQL][FOLLOWUP] Fix a `mode` test in DataFrameSuite
This is an automated email from the ASF dual-hosted git repository.
maxgekk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 83961bc59a41 [MINOR][SQL][FOLLOWUP] Fix a `mode` test in DataFrameSuite
83961bc59a41 is described below
commit 83961bc59a4157ebcaf3e6230813e0852f27ed9f
Author: Max Gekk <ma...@gmail.com>
AuthorDate: Thu Jan 23 10:55:15 2025 +0200
[MINOR][SQL][FOLLOWUP] Fix a `mode` test in DataFrameSuite
### What changes were proposed in this pull request?
Rename `mode` in a test in `DataFrameSuite`.
### Why are the changes needed?
To fix the failed test.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
By running the modified test:
```
$ build/sbt "test:testOnly org.apache.spark.sql.DataFrameSuite"
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #49621 from MaxGekk/fix-mode-test.
Authored-by: Max Gekk <ma...@gmail.com>
Signed-off-by: Max Gekk <ma...@gmail.com>
---
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
index 71d55b007aa1..f42423305051 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
@@ -2058,7 +2058,7 @@ class DataFrameSuite extends QueryTest
test("SPARK-29442 Set `default` mode should override the existing mode") {
val df = Seq(Tuple1(1)).toDF()
val writer = df.write.mode("overwrite").mode("default")
- val modeField = classOf[DataFrameWriter[_]].getDeclaredField("mode")
+ val modeField = classOf[DataFrameWriter[_]].getDeclaredField("curmode")
modeField.setAccessible(true)
assert(SaveMode.ErrorIfExists === modeField.get(writer).asInstanceOf[SaveMode])
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org