beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From echauc...@apache.org
Subject [beam] 35/37: Remove unneeded cast
Date Thu, 24 Oct 2019 10:18:39 GMT
This is an automated email from the ASF dual-hosted git repository.

echauchot pushed a commit to branch spark-runner_structured-streaming
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 27ef6de3fa90db6d59027f9a6fa792fc5787f6e9
Author: Etienne Chauchot <echauchot@apache.org>
AuthorDate: Wed Oct 23 11:51:49 2019 +0200

    Remove unneeded cast
---
 .../spark/structuredstreaming/translation/helpers/KVHelpers.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/KVHelpers.java
b/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/KVHelpers.java
index 1983eaa..2fa4b1a 100644
--- a/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/KVHelpers.java
+++ b/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/KVHelpers.java
@@ -25,7 +25,7 @@ import org.apache.spark.api.java.function.MapFunction;
 public final class KVHelpers {
 
   /** A Spark {@link MapFunction} for extracting the key out of a {@link KV} for GBK for
example. */
-  public static <K, V> MapFunction<WindowedValue<KV<K, V>>, K> extractKey()
{
-    return (MapFunction<WindowedValue<KV<K, V>>, K>) wv -> wv.getValue().getKey();
+  public static <K, V>  MapFunction<WindowedValue<KV<K, V>>, K> extractKey()
{
+    return wv -> wv.getValue().getKey();
   }
 }


Mime
View raw message