This is an automated email from the ASF dual-hosted git repository.
dongjoon 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 ea4b82e97d94 [MINOR][SQL][TESTS] Check `sqlState` in `checkError()`
ea4b82e97d94 is described below
commit ea4b82e97d944717b32aaaec986a8238e59b8acf
Author: Max Gekk <[email protected]>
AuthorDate: Tue Sep 10 13:21:45 2024 -0700
[MINOR][SQL][TESTS] Check `sqlState` in `checkError()`
### What changes were proposed in this pull request?
In the PR, I propose to bypass the `sqlState` parameter in `checkError()`
to another `checkError()` to take it into account.
### Why are the changes needed?
At the moment, the `sqlState` argument is not checked in some tests.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
By running the affected tests:
```
$ build/sbt "test:testOnly *QueryParsingErrorsSuite"
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #48059 from MaxGekk/unused-sqlState-param.
Lead-authored-by: Max Gekk <[email protected]>
Co-authored-by: Maxim Gekk <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
core/src/test/scala/org/apache/spark/SparkFunSuite.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala
b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala
index 4aca98c1413a..9f310c06ac5a 100644
--- a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala
+++ b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala
@@ -415,7 +415,7 @@ abstract class SparkFunSuite
condition: String,
sqlState: String,
context: ExpectedContext): Unit =
- checkError(exception, condition, None, Map.empty, false, Array(context))
+ checkError(exception, condition, Some(sqlState), Map.empty, false,
Array(context))
protected def checkError(
exception: SparkThrowable,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]