This is an automated email from the ASF dual-hosted git repository.
maxgekk pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 4841a404be3 [SPARK-45459][SQL][TESTS][DOCS] Remove the last 2 extra
spaces in the automatically generated `sql-error-conditions.md` file
4841a404be3 is described below
commit 4841a404be3c37fc16031a0119b321eefcb2faab
Author: panbingkun <[email protected]>
AuthorDate: Mon Oct 9 12:32:14 2023 +0300
[SPARK-45459][SQL][TESTS][DOCS] Remove the last 2 extra spaces in the
automatically generated `sql-error-conditions.md` file
### What changes were proposed in this pull request?
The pr aims to remove the last 2 extra spaces in the automatically
generated `sql-error-conditions.md` file.
### Why are the changes needed?
- When I am work on another PR, I use the following command:
```
SPARK_GENERATE_GOLDEN_FILES=1 build/sbt \
"core/testOnly *SparkThrowableSuite -- -t \"Error classes match
with document\""
```
I found that in the automatically generated `sql-error-conditions.md`
file, there are 2 extra spaces added at the end,
Obviously, this is not what we expected, otherwise we would need to
manually remove it, which is not in line with automation.
- The git tells us this difference, as follows:
<img width="725" alt="image"
src="https://github.com/apache/spark/assets/15246973/a68b657f-3a00-4405-9623-1f7ab9d44d82">
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- Pass GA.
- Manually test.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #43274 from panbingkun/SPARK-45459.
Authored-by: panbingkun <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
(cherry picked from commit af800b505956ff26e03c5fc56b6cb4ac5c0efe2f)
Signed-off-by: Max Gekk <[email protected]>
---
core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
index 0249cde5488..299bcea3f9e 100644
--- a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
+++ b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala
@@ -253,8 +253,7 @@ class SparkThrowableSuite extends SparkFunSuite {
|
|Also see [SQLSTATE Codes](sql-error-conditions-sqlstates.html).
|
- |$sqlErrorParentDocContent
- |""".stripMargin
+ |$sqlErrorParentDocContent""".stripMargin
errors.filter(_._2.subClass.isDefined).foreach(error => {
val name = error._1
@@ -316,7 +315,7 @@ class SparkThrowableSuite extends SparkFunSuite {
}
FileUtils.writeStringToFile(
parentDocPath.toFile,
- sqlErrorParentDoc + lineSeparator,
+ sqlErrorParentDoc,
StandardCharsets.UTF_8)
}
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]