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/25 08:30:06 UTC

[GitHub] [spark] panbingkun opened a new pull request, #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite

panbingkun opened a new pull request, #38386:
URL: https://github.com/apache/spark/pull/38386

   ### What changes were proposed in this pull request?
   his PR aims to replace 'intercept' with 'Check error classes' in HiveQuerySuite.
   
   ### Why are the changes needed?
   The changes improve the error framework.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   By running the modified test suite:
   ```
   $ build/sbt "test:testOnly *HiveQuerySuite"
   ```


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


[GitHub] [spark] MaxGekk commented on a diff in pull request #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on code in PR #38386:
URL: https://github.com/apache/spark/pull/38386#discussion_r1004847037


##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala:
##########
@@ -73,9 +72,17 @@ class HiveQuerySuite extends HiveComparisonTest with SQLTestUtils with BeforeAnd
     }
   }
 
-  private def assertUnsupportedFeature(body: => Unit): Unit = {
-    val e = intercept[ParseException] { body }
-    assert(e.getMessage.toLowerCase(Locale.ROOT).contains("operation not allowed"))
+  private def assertUnsupportedFeature(
+    body: => Unit,
+    message: String,
+    expectedContext: ExpectedContext): Unit = {

Review Comment:
   4 spaces, see https://github.com/databricks/scala-style-guide#spacing-and-indentation:
   ```suggestion
         body: => Unit,
         message: String,
         expectedContext: ExpectedContext): Unit = {
   ```



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


[GitHub] [spark] panbingkun commented on pull request #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite

Posted by GitBox <gi...@apache.org>.
panbingkun commented on PR #38386:
URL: https://github.com/apache/spark/pull/38386#issuecomment-1290396879

   > @panbingkun The test `lookup hive UDF in another thread` fails on my laptop locally:
   > 
   > ```
   > Exception in thread "test" org.scalatest.exceptions.TestFailedException: Map("rawName" -> "not_a_udf", "fullName" -> "spark_catalog.a.not_a_udf") did not equal Map("rawName" -> "not_a_udf", "fullName" -> "spark_catalog.default.not_a_udf")
   > 	at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
   > 	at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
   > 	at org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1231)
   > 	at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:1295)
   > 	at org.apache.spark.SparkFunSuite.checkError(SparkFunSuite.scala:317)
   > 	at org.apache.spark.SparkFunSuite.checkError(SparkFunSuite.scala:355)
   > 	at org.apache.spark.sql.hive.execution.HiveQuerySuite$$anon$1.run(HiveQuerySuite.scala:1451)
   > [info] - lookup hive UDF in another thread *** FAILED *** (156 milliseconds)
   > [info]   success was false (HiveQuerySuite.scala:1457)
   > ```
   
   I have fixed it.
   


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


[GitHub] [spark] MaxGekk commented on pull request #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38386:
URL: https://github.com/apache/spark/pull/38386#issuecomment-1290994630

   +1, LGTM. Merging to master.
   Thank you, @panbingkun.


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


[GitHub] [spark] MaxGekk commented on pull request #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38386:
URL: https://github.com/apache/spark/pull/38386#issuecomment-1290295035

   @panbingkun The test `lookup hive UDF in another thread` fails on my laptop locally:
   ```
   Exception in thread "test" org.scalatest.exceptions.TestFailedException: Map("rawName" -> "not_a_udf", "fullName" -> "spark_catalog.a.not_a_udf") did not equal Map("rawName" -> "not_a_udf", "fullName" -> "spark_catalog.default.not_a_udf")
   	at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
   	at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
   	at org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1231)
   	at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:1295)
   	at org.apache.spark.SparkFunSuite.checkError(SparkFunSuite.scala:317)
   	at org.apache.spark.SparkFunSuite.checkError(SparkFunSuite.scala:355)
   	at org.apache.spark.sql.hive.execution.HiveQuerySuite$$anon$1.run(HiveQuerySuite.scala:1451)
   [info] - lookup hive UDF in another thread *** FAILED *** (156 milliseconds)
   [info]   success was false (HiveQuerySuite.scala:1457)
   ```


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


[GitHub] [spark] MaxGekk closed pull request #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite

Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #38386: [SPARK-40888][SQL][TESTS] Check error classes in HiveQuerySuite
URL: https://github.com/apache/spark/pull/38386


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