crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject crunch git commit: CRUNCH-625: Add missing .union implementations for LTables with LTables and PTables
Date Fri, 21 Oct 2016 08:23:59 GMT
Repository: crunch
Updated Branches:
  refs/heads/master ef8d60f2b -> e929e0444


CRUNCH-625: Add missing .union implementations for LTables with LTables and PTables


Project: http://git-wip-us.apache.org/repos/asf/crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/e929e044
Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/e929e044
Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/e929e044

Branch: refs/heads/master
Commit: e929e04442f2b00acb6437574280208bc2d26998
Parents: ef8d60f
Author: David Whiting <davw@apache.org>
Authored: Thu Oct 20 16:17:00 2016 +0200
Committer: David Whiting <davw@apache.org>
Committed: Thu Oct 20 16:17:00 2016 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/crunch/lambda/LTable.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/crunch/blob/e929e044/crunch-lambda/src/main/java/org/apache/crunch/lambda/LTable.java
----------------------------------------------------------------------
diff --git a/crunch-lambda/src/main/java/org/apache/crunch/lambda/LTable.java b/crunch-lambda/src/main/java/org/apache/crunch/lambda/LTable.java
index 8360a33..4b08887 100644
--- a/crunch-lambda/src/main/java/org/apache/crunch/lambda/LTable.java
+++ b/crunch-lambda/src/main/java/org/apache/crunch/lambda/LTable.java
@@ -18,6 +18,7 @@
 package org.apache.crunch.lambda;
 
 import org.apache.crunch.GroupingOptions;
+import org.apache.crunch.PCollection;
 import org.apache.crunch.PTable;
 import org.apache.crunch.Pair;
 import org.apache.crunch.Target;
@@ -214,4 +215,14 @@ public interface LTable<K, V> extends LCollection<Pair<K,
V>> {
             ctx.emit(ctx.element());
         }, pType());
     }
+
+    /** {@inheritDoc */
+    default LTable<K, V> union(LTable<K, V> other) {
+        return factory().wrap(underlying().union(other.underlying()));
+    }
+
+    /** {@inheritDoc */
+    default LTable<K, V> union(PTable<K, V> other) {
+        return factory().wrap(underlying().union(other));
+    }
 }


Mime
View raw message