MaxGekk commented on code in PR #43438:
URL: https://github.com/apache/spark/pull/43438#discussion_r1365608463
##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/MultiDatabaseSuite.scala:
##########
@@ -297,7 +297,7 @@ class MultiDatabaseSuite extends QueryTest with
SQLTestUtils with TestHiveSingle
|)
""".stripMargin)
}.getMessage
- assert(message.contains("`t:a` is not a valid name for
tables/databases. " +
+ assert(message.contains("`t:a` is not a valid name for tables/schemas.
" +
Review Comment:
@srielau Since you are here, could you use `checkError` (and the error
class), please.
##########
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala:
##########
@@ -644,7 +644,8 @@ class CliSuite extends SparkFunSuite {
test("SPARK-37694: delete [jar|file|archive] shall use spark sql processor")
{
runCliWithin(2.minute, errorResponses = Seq("ParseException"))(
- "delete jar dummy.jar;" -> "Syntax error at or near 'jar': missing
'FROM'.(line 1, pos 7)")
+ "delete jar dummy.jar;" ->
+ "Syntax error at or near 'jar': missing 'FROM'. SQLSTATE: 42601(line
1, pos 7)")
Review Comment:
Looking at this, should we add a '.' after SQLSTATE like:
```suggestion
"Syntax error at or near 'jar': missing 'FROM'. SQLSTATE: 42601.
(line 1, pos 7)")
```
##########
core/src/test/scala/org/apache/spark/metrics/sink/GraphiteSinkSuite.scala:
##########
@@ -90,7 +90,7 @@ class GraphiteSinkSuite extends SparkFunSuite {
}
assert(e.getErrorClass === "GRAPHITE_SINK_PROPERTY_MISSING")
assert(e.getMessage ===
- "[GRAPHITE_SINK_PROPERTY_MISSING] Graphite sink requires 'host'
property.")
+ "[GRAPHITE_SINK_PROPERTY_MISSING] Graphite sink requires 'host'
property. SQLSTATE: KD000")
Review Comment:
Since you are here, please, use `checkError`.
##########
sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala:
##########
@@ -2570,7 +2570,7 @@ class ColumnExpressionSuite extends QueryTest with
SharedSparkSession {
assert(e3.getCause.isInstanceOf[RuntimeException])
assert(e3.getCause.getMessage.matches(
- "\\[USER_RAISED_EXCEPTION\\] '\\(a#\\d+ > b#\\d+\\)' is not true!"))
+ "\\[USER_RAISED_EXCEPTION\\] '\\(a#\\d+ > b#\\d+\\)' is not true!
SQLSTATE: P0001"))
Review Comment:
Could you try to use a regexp to match the SQLSTATE?
##########
core/src/test/scala/org/apache/spark/metrics/sink/GraphiteSinkSuite.scala:
##########
@@ -103,7 +103,7 @@ class GraphiteSinkSuite extends SparkFunSuite {
}
assert(e.getErrorClass === "GRAPHITE_SINK_PROPERTY_MISSING")
assert(e.getMessage ===
- "[GRAPHITE_SINK_PROPERTY_MISSING] Graphite sink requires 'port'
property.")
+ "[GRAPHITE_SINK_PROPERTY_MISSING] Graphite sink requires 'port'
property. SQLSTATE: KD000")
Review Comment:
The same, try to use `checkError`.
--
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]