srielau commented on code in PR #37887:
URL: https://github.com/apache/spark/pull/37887#discussion_r995927458
##########
core/src/test/scala/org/apache/spark/SparkFunSuite.scala:
##########
@@ -374,6 +382,19 @@ abstract class SparkFunSuite
checkError(exception, errorClass, sqlState, parameters,
matchPVals = true, Array(context))
+ protected def checkErrorTableNotFound(
Review Comment:
There are two patterns:
` val e = intercept[AnalysisException] {
sql(s"ALTER TABLE $catalog.ns.no_tbl PARTITION (id=1) RENAME TO
PARTITION (id=2)")
}
checkErrorTableNotFound(e, s"`$catalog`.`ns`.`no_tbl`",
ExpectedContext(s"$catalog.ns.no_tbl", 12, 11 +
s"$catalog.ns.no_tbl".length))
`
and
`
val exc = intercept[NoSuchTableException] {
catalog.loadTable(testIdent)
}
checkErrorTableNotFound(exc, testIdentQuoted)
`
Not sure how the API of that new shared function would look like.
@MaxGekk @cloud-fan
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]