huangxiaopingRD opened a new pull request, #8916:
URL: https://github.com/apache/paimon/pull/8916

   ### Purpose
   
   Remove unreachable try-catch blocks in `LambdaScalarFunction`.
   
   The try-catch in the constructor only wraps plain field assignments, and the 
one in `bind()` only wraps building a list of `DataType`s plus calling the 
`PaimonSparkScalarFunction` constructor, which also just assigns fields. 
Neither block can throw, so the catches are unreachable dead code since their 
introduction in #5604.
   
   The removed catch message "Failed to compile lambda expression" was also 
misleading: lambda compilation does not happen in `LambdaScalarFunction` at 
all. It is deferred to `PaimonSparkScalarFunction.produceResult()`, where 
`JavaLambdaStringToMethodConverter.compileAndLoadMethod` is invoked lazily on 
first execution. Any real compilation failure is still reported from that path, 
so error reporting behavior is unchanged.
   
   ### Tests
   
   No new tests: this is a dead-code removal with no behavior change. Verified 
that `paimon-spark-common` compiles (`mvn -pl paimon-spark/paimon-spark-common 
-Pfast-build -Pspark3 -DskipTests compile`); existing function-related IT cases 
cover the unchanged runtime path.


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

Reply via email to