Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19687#discussion_r149765467
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoderSuite.scala
 ---
    @@ -370,7 +372,7 @@ class ExpressionEncoderSuite extends PlanTest with 
AnalysisTest {
       private def encodeDecodeTest[T : ExpressionEncoder](
           input: T,
           testName: String): Unit = {
    -    test(s"encode/decode for $testName: $input") {
    +    testAndVerifyNotLeakingReflectionObjects(s"encode/decode for 
$testName: $input") {
           val encoder = implicitly[ExpressionEncoder[T]]
    --- End diff --
    
    This is to verify that `UnresolvedMapObjects` doesn't leak. ScalaReflection 
creates a function here but the function runs after creating the encoder: 
https://github.com/apache/spark/blob/6327ea570bf542983081c5d1d3ee7e6123365c8f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala#L280
 
    
    



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to