You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/06/26 06:56:04 UTC
[GitHub] [spark] panbingkun commented on a diff in pull request #41699: [SPARK-44143][SQL][TESTS] Use checkError() to check Exception in *DDL*Suite
panbingkun commented on code in PR #41699:
URL: https://github.com/apache/spark/pull/41699#discussion_r1241705587
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala:
##########
@@ -431,9 +427,11 @@ abstract class DDLSuite extends QueryTest with DDLSuiteBase {
|$partitionClause
""".stripMargin
if (userSpecifiedSchema.isEmpty && userSpecifiedPartitionCols.nonEmpty) {
- val e = intercept[AnalysisException](sql(sqlCreateTable)).getMessage
- assert(e.contains(
- "not allowed to specify partition columns when the table schema is not defined"))
+ checkError(
+ exception = intercept[AnalysisException](sql(sqlCreateTable)),
+ errorClass = null,
Review Comment:
Yes, that's right. I'll do this now.😄
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org