You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/16 06:46:05 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38259: [SPARK-40784][SQL][TESTS] Check error classes in DDLParserSuite

MaxGekk commented on code in PR #38259:
URL: https://github.com/apache/spark/pull/38259#discussion_r996397614


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala:
##########
@@ -204,12 +204,17 @@ trait AnalysisTest extends PlanTest {
   protected def interceptParseException(parser: String => Any)(
     sqlCommand: String, messages: String*)(
     errorClass: Option[String] = None): Unit = {
-    val e = intercept[ParseException](parser(sqlCommand))
+    val e = parseException(parser)(sqlCommand)
     messages.foreach { message =>
       assert(e.message.contains(message))
     }
     if (errorClass.isDefined) {
       assert(e.getErrorClass == errorClass.get)
     }
   }
+
+  protected def parseException(parser: String => Any)(
+    sqlText: String): ParseException = {

Review Comment:
   Should be 4 spaces, see https://github.com/databricks/scala-style-guide#spacing-and-indentation



-- 
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