[
https://issues.apache.org/jira/browse/FLINK-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163168#comment-15163168
]
ASF GitHub Bot commented on FLINK-1159:
---------------------------------------
Github user stefanobaghino commented on the pull request:
https://github.com/apache/flink/pull/1704#issuecomment-188301093
Thanks @tillrohrmann, I'll fix the errors in the comments and add the
missing methods and extensions.
Regarding the import mode, I agree with you. I started off with just one
`DataSet` but then had to support many, I'll try to go back to the original
design while retaining multiple ´DataSet´ subtype extensions.
The only thing I'm not very convinced of from your snippet is about
returning the extended `DataStreamWithPartialFunctionSupport` class. Implicit
conversions have no runtime cost, so maybe it would be better to just return
the `DataSet` to make the code more compact and readable. What do you think?
Regarding the tests: I actually have some tests in place locally but
basically they're just copies of the original tests on the operators. Should I
commit them as well?
Regarding the docs: absolutely, I wasn't sure about this. Where do you
think it would be better to put them? Should I add a new chapter under the
programming guides?
> Case style anonymous functions not supported by Scala API
> ---------------------------------------------------------
>
> Key: FLINK-1159
> URL: https://issues.apache.org/jira/browse/FLINK-1159
> Project: Flink
> Issue Type: Bug
> Components: Scala API
> Reporter: Till Rohrmann
> Assignee: Stefano Baghino
>
> In Scala it is very common to define anonymous functions of the following form
> {code}
> {
> case foo: Bar => foobar(foo)
> case _ => throw new RuntimeException()
> }
> {code}
> These case style anonymous functions are not supported yet by the Scala API.
> Thus, one has to write redundant code to name the function parameter.
> What works is the following pattern, but it is not intuitive for someone
> coming from Scala:
> {code}
> dataset.map{
> _ match{
> case foo:Bar => ...
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)