Skip to content

Commit

Permalink
[SPARK-48358][SQL][TESTS][FOLLOWUP] Use condition instead of `error…
Browse files Browse the repository at this point in the history
…Class` in `SqlScriptingInterpreterSuite`

### What changes were proposed in this pull request?
In the PR, I propose to replace `errorClass` by `condition` in `SqlScriptingInterpreterSuite`

### Why are the changes needed?
The changes from the PR apache#47756 conflict to apache#48027

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
By running the modified test:
```
$ build/sbt "test:testOnly *SqlScriptingInterpreterSuite"
```

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#48072 from MaxGekk/fix-errorClass-REPEAT.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
  • Loading branch information
MaxGekk authored and attilapiros committed Oct 4, 2024
1 parent cad3e65 commit f374029
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ class SqlScriptingInterpreterSuite extends QueryTest with SharedSparkSession {
exception = intercept[SqlScriptingException] (
runSqlScript(commands)
),
errorClass = "INVALID_BOOLEAN_STATEMENT",
condition = "INVALID_BOOLEAN_STATEMENT",
parameters = Map("invalidStatement" -> "1")
)
}
Expand All @@ -693,7 +693,7 @@ class SqlScriptingInterpreterSuite extends QueryTest with SharedSparkSession {
exception = intercept[SqlScriptingException] (
runSqlScript(commands)
),
errorClass = "BOOLEAN_STATEMENT_WITH_EMPTY_ROW",
condition = "BOOLEAN_STATEMENT_WITH_EMPTY_ROW",
parameters = Map("invalidStatement" -> "(SELECT * FROM T)")
)
}
Expand All @@ -719,7 +719,7 @@ class SqlScriptingInterpreterSuite extends QueryTest with SharedSparkSession {
exception = intercept[SparkException] (
runSqlScript(commands)
),
errorClass = "SCALAR_SUBQUERY_TOO_MANY_ROWS",
condition = "SCALAR_SUBQUERY_TOO_MANY_ROWS",
parameters = Map.empty,
context = ExpectedContext(fragment = "(SELECT * FROM t)", start = 141, stop = 157)
)
Expand Down

0 comments on commit f374029

Please sign in to comment.