flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7811) Add support for Scala 2.12
Date Wed, 24 Oct 2018 09:47:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662026#comment-16662026
] 

ASF GitHub Bot commented on FLINK-7811:
---------------------------------------

aljoscha commented on a change in pull request #6784: [FLINK-7811] Add support for Scala 2.12
URL: https://github.com/apache/flink/pull/6784#discussion_r227718201
 
 

 ##########
 File path: flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStream.scala
 ##########
 @@ -414,6 +414,22 @@ class DataStream[T](stream: JavaStream[T]) {
     asScalaStream(new JavaKeyedStream(stream, keyExtractor, keyType))
   }
 
+  /**
+   * Groups the elements of a DataStream by the given K key to
+   * be used with grouped operators like grouped reduce or grouped aggregations.
+   */
+  def keyBy[K: TypeInformation](fun: KeySelector[T, K]): KeyedStream[T, K] = {
+
+    val cleanFun = clean(fun)
+    val keyType: TypeInformation[K] = implicitly[TypeInformation[K]]
+
+    val keyExtractor = new KeySelector[T, K] with ResultTypeQueryable[K] {
 
 Review comment:
   I don't think so, I'm changing it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add support for Scala 2.12
> --------------------------
>
>                 Key: FLINK-7811
>                 URL: https://issues.apache.org/jira/browse/FLINK-7811
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Scala API
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message