gabrywu opened a new issue, #27465:
URL: https://github.com/apache/beam/issues/27465
### What would you like to happen?
I want to create a new UDF which supports a lambda parameter, for example
```java
static class LambdaUDFA implements BeamSqlUdf {
public static List<Row> eval(@Parameter(name = "rows") List<Row>
rows,
@Parameter(name = "filter")
Predicate1<Row> filter) {
return
rows.stream().filter(filter::apply).collect(Collectors.toList());
}
}
```
But beam SQL throws an exception like this
`sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast
to java.lang.Class`
### Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
### Issue Components
- [ ] Component: Python SDK
- [X] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
--
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]