This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 96bbf065df [spark] Remove useless try-catch in LambdaScalarFunction
(#8916)
96bbf065df is described below
commit 96bbf065dfa0672c58a875cd141fb30624361640
Author: huangxiaoping <[email protected]>
AuthorDate: Thu Jul 30 19:20:35 2026 +0800
[spark] Remove useless try-catch in LambdaScalarFunction (#8916)
---
.../apache/paimon/spark/LambdaScalarFunction.java | 26 ++++++++--------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git
a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/LambdaScalarFunction.java
b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/LambdaScalarFunction.java
index 5621df0cff..9907890166 100644
---
a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/LambdaScalarFunction.java
+++
b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/LambdaScalarFunction.java
@@ -40,28 +40,20 @@ public class LambdaScalarFunction implements
UnboundFunction, Serializable {
public LambdaScalarFunction(
String functionName, DataType outputType, String javaType, String
lambdaExpression) {
- try {
- this.outputType = outputType;
- this.javaType = javaType;
- this.functionName = functionName;
- this.lambdaExpression = lambdaExpression;
- } catch (Exception e) {
- throw new RuntimeException("Failed to compile lambda expression",
e);
- }
+ this.outputType = outputType;
+ this.javaType = javaType;
+ this.functionName = functionName;
+ this.lambdaExpression = lambdaExpression;
}
@Override
public BoundFunction bind(StructType inputType) {
- try {
- List<DataType> inputTypes = new ArrayList<>();
- for (StructField field : inputType.fields()) {
- inputTypes.add(field.dataType());
- }
- return new PaimonSparkScalarFunction(
- functionName, inputTypes, outputType, javaType,
this.lambdaExpression);
- } catch (Exception e) {
- throw new RuntimeException(e);
+ List<DataType> inputTypes = new ArrayList<>();
+ for (StructField field : inputType.fields()) {
+ inputTypes.add(field.dataType());
}
+ return new PaimonSparkScalarFunction(
+ functionName, inputTypes, outputType, javaType,
this.lambdaExpression);
}
@Override