anishshri-db opened a new pull request, #49099:
URL: https://github.com/apache/spark/pull/49099

   ### What changes were proposed in this pull request?
   Split EncoderImplicits from SQLImplicits and provide helper object within 
StatefulProcessor to access underlying SQL Encoder related implicit functions
   
   
   ### Why are the changes needed?
   Without this, we cannot handle the implicit encoder APIs on the executor. We 
would run into a NPE since the spark session is not available on the executors. 
One option is to pass the `SparkSession` or `SQLImplicits` directly to the 
`StatefulProcessor`. However, this risks exposing some methods relying on 
`SparkSession` again.
   
   Hence, we do 2 things:
   - split the encoder related functions that don't rely on `SparkSession` into 
a separate trait
   - expose a helper `implicits` object within the `StatefulProcessor` 
interface that users can import directly, providing access to only the 
necessary functions
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   
   ### How was this patch tested?
   Added unit tests
   
   ```
   [info] Run completed in 9 minutes, 30 seconds.
   [info] Total number of tests run: 128
   [info] Suites: completed 1, aborted 0
   [info] Tests: succeeded 128, failed 0, canceled 0, ignored 0, pending 0
   [info] All tests passed.
   ```
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to