You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "gabrywu (via GitHub)" <gi...@apache.org> on 2023/07/12 02:01:14 UTC
[GitHub] [beam] gabrywu opened a new issue, #27465: [Feature Request]: UDF supports lambda parameter
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: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature Request]: UDF supports lambda & RecordType parameter [beam]
Posted by "gabrywu (via GitHub)" <gi...@apache.org>.
gabrywu closed issue #27465: [Feature Request]: UDF supports lambda & RecordType parameter
URL: https://github.com/apache/beam/issues/27465
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature Request]: UDF supports lambda & RecordType parameter [beam]
Posted by "Amar3tto (via GitHub)" <gi...@apache.org>.
Amar3tto commented on issue #27465:
URL: https://github.com/apache/beam/issues/27465#issuecomment-2220094643
@gabrywu FYI
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org