Skip to content

Conversation

@panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Oct 25, 2022

What changes were proposed in this pull request?

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

@github-actions github-actions bot added the SQL label Oct 25, 2022
@MaxGekk
Copy link
Member

MaxGekk commented Oct 25, 2022

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

@panbingkun
Copy link
Contributor Author

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

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except of a comment.

@MaxGekk
Copy link
Member

MaxGekk commented Oct 25, 2022

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

@MaxGekk MaxGekk closed this in f5d692d Oct 25, 2022
@panbingkun panbingkun deleted the SPARK-40888 branch November 7, 2022 01:57
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
### What changes were proposed in this pull request?
This 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"
```

Closes apache#38386 from panbingkun/SPARK-40888.

Lead-authored-by: panbingkun <pbk1982@gmail.com>
Co-authored-by: Maxim Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants