HyukjinKwon commented on code in PR #59462:
URL: https://github.com/apache/spark/pull/59462#discussion_r4283224907


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoderSuite.scala:
##########
@@ -1021,4 +1027,25 @@ class ExpressionEncoderSuite extends 
CodegenInterpretedPlanTest with AnalysisTes
       }
     }
   }
+
+  test("SPARK-60216: inner class encoder missing outer scope") {

Review Comment:
   **Nit (P3):** This test is appended after the suite's trailing private 
helpers (`testOverflowingBigNumeric` ... 
`testAndVerifyNotLeakingReflectionObjects`), and its only fixture, 
`OuterClassForTest`, is declared near the top of the class, about 845 lines 
away. Could you move the test and the fixture together next to the existing 
inner-class / outer-scope encoder coverage (the `InnerClass` and 
`MalformedClassObject` cases in the product-encoder section)? Please keep the 
fixture a member class of the suite rather than a local class inside the test: 
a local class is not a member class, so `NewInstance` would not need an outer 
pointer and the test would stop hitting this error path.
   
   **Verification:**
   - **Inspection:** The suite's member order shows the new test next to its 
fixture and to the existing inner-class encoder coverage, with the private 
helpers still forming the trailing section.
   - **Behavior:** The relocated test still reaches the missing-outer-scope 
failure and asserts the named condition and className parameter in both the 
codegen and interpreted registrations.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to