[
https://issues.apache.org/jira/browse/FLINK-1159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15222095#comment-15222095
]
ASF GitHub Bot commented on FLINK-1159:
---------------------------------------
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1704#issuecomment-204500365
Looks pretty good. I noticed three remaining things:
- Sometimes, the package and the directory trees are different (example:
`OnCoGroupDataSetTest.scala`). While Scala allows that, we usually keep them in
sync.
- The classes that implement the "withX" functions sometimes have context
bounds that I think they should not require (see inline comment above). Would
be great to remove them, because removing them later makes it API breaking.
- We need to decide how to label this for the future: stable, or
evolving. I would suggest to use `@PublicEvolving` on all the involved classes
for now.
> 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)