Skip to content

Commit

Permalink
[SPARK-49748][CORE][FOLLOWUP] Add getCondition and deprecate `getEr…
Browse files Browse the repository at this point in the history
…rorClass` in `QueryCompilationErrorsSuite`

### What changes were proposed in this pull request?
The pr is following up apache#48196

### Why are the changes needed?
Revise the logic of the newly added logic.

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

### How was this patch tested?
Pass GA.

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

Closes apache#48416 from panbingkun/SPARK-49748_FOLLOWUP.

Authored-by: panbingkun <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
  • Loading branch information
panbingkun authored and MaxGekk committed Oct 11, 2024
1 parent 8e1d317 commit 6d0b838
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ class QueryCompilationErrorsSuite
val exception = intercept[AnalysisException] {
sql(queryWithTrailingComma)
}
assert(exception.getErrorClass === "TRAILING_COMMA_IN_SELECT")
assert(exception.getCondition === "TRAILING_COMMA_IN_SELECT")
}

val unresolvedColumnErrors = Seq(
Expand All @@ -1017,7 +1017,7 @@ class QueryCompilationErrorsSuite
val exception = intercept[AnalysisException] {
sql(query)
}
assert(exception.getErrorClass === "UNRESOLVED_COLUMN.WITH_SUGGESTION")
assert(exception.getCondition === "UNRESOLVED_COLUMN.WITH_SUGGESTION")
}

// sanity checks
Expand Down

0 comments on commit 6d0b838

Please sign in to comment.