MaxGekk commented on code in PR #38728:
URL: https://github.com/apache/spark/pull/38728#discussion_r1033260567
##########
connector/connect/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectPlannerSuite.scala:
##########
@@ -329,19 +346,25 @@ class SparkConnectPlannerSuite extends SparkFunSuite with
SparkConnectPlanTest {
.setAllColumnsAsKeys(true)
.addColumnNames("test")
- val e = intercept[InvalidPlanInput] {
- transform(proto.Relation.newBuilder.setDeduplicate(deduplicate).build())
- }
- assert(
- e.getMessage.contains("Cannot deduplicate on both all columns and a
subset of columns"))
+ checkError(
+ exception = intercept[InvalidPlanInput] {
+
transform(proto.Relation.newBuilder.setDeduplicate(deduplicate).build())
+ },
+ errorClass = "CONNECT.INVALID_PLAN_INPUT",
+ parameters = Map("msg" -> "Cannot deduplicate on both all columns and a
subset of columns"))
Review Comment:
Would it possible to move all the plain text to `error-classes.json`. Could
you image that we will translate errors to local languages in the future, or
tech editors will fix some typos in the texts. In your case, we will have to
rebuild Spark which is not nice approach.
--
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]