Skip to content

Commit

Permalink
[MINOR][SQL][TESTS] Check sqlState in checkError()
Browse files Browse the repository at this point in the history
### 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 apache#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]>
  • Loading branch information
MaxGekk authored and dongjoon-hyun committed Sep 10, 2024
1 parent 8f66272 commit ea4b82e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/test/scala/org/apache/spark/SparkFunSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ea4b82e

Please sign in to comment.