blob: 2ce1b337b1bd26c638b1032a667a181a9c4b636a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Sets (Apache Beam 2.38.0-SNAPSHOT)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Sets (Apache Beam 2.38.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/beam/sdk/transforms/SerializableFunctions.html" title="class in org.apache.beam.sdk.transforms"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/transforms/SimpleFunction.html" title="class in org.apache.beam.sdk.transforms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/transforms/Sets.html" target="_top">Frames</a></li>
<li><a href="Sets.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.beam.sdk.transforms</div>
<h2 title="Class Sets" class="title">Class Sets</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.transforms.Sets</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">Sets</span>
extends java.lang.Object</pre>
<div class="block">The <code>PTransform</code>s that allow to compute different set functions across <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>s.
<p>They come in two variants. 1. Between two <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> 2. Between two or more <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> in a <a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values"><code>PCollectionList</code></a>.
<p>Following <code>PTransform</code>s follows SET DISTINCT semantics: intersectDistinct,
expectDistinct, unionDistinct
<p>Following <code>PTransform</code>s follows SET ALL semantics: intersectAll, expectAll, unionAll
<p>For example, the following demonstrates intersectDistinct between two collections <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>s.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "3", "4", "4", "6"));
PCollection&lt;String&gt; results =
left.apply(SetFns.intersectDistinct(right)); // results will be PCollection&lt;String&gt; containing: "1","3","4"
</code></pre>
<p>For example, the following demonstrates intersectDistinct between three collections <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>s in a <a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values"><code>PCollectionList</code></a>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "3", "4", "4", "6"));
PCollection&lt;String&gt; third = p.apply(Create.of("3", "4", "4"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.intersectDistinct()); // results will be PCollection&lt;String&gt; containing: "3","4"
</code></pre></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#Sets--">Sets</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#exceptAll--">exceptAll</a></span>()</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics which takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the difference
all (exceptAll) of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#exceptAll-org.apache.beam.sdk.values.PCollection-">exceptAll</a></span>(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics to compute the
difference all (exceptAll) with provided <code>PCollection&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#exceptDistinct--">exceptDistinct</a></span>()</code>
<div class="block">Returns a <code>PTransform</code> that takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a
<code>PCollection&lt;T&gt;</code> containing the difference (except) of collections done in order for all
collections in <code>PCollectionList&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#exceptDistinct-org.apache.beam.sdk.values.PCollection-">exceptDistinct</a></span>(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics to compute the
difference (except) with provided <code>PCollection&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#intersectAll--">intersectAll</a></span>()</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics which takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the
intersection all of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#intersectAll-org.apache.beam.sdk.values.PCollection-">intersectAll</a></span>(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics to compute the
intersection with provided <code>PCollection&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#intersectDistinct--">intersectDistinct</a></span>()</code>
<div class="block">Returns a <code>PTransform</code> that takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a
<code>PCollection&lt;T&gt;</code> containing the intersection of collections done in order for all
collections in <code>PCollectionList&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#intersectDistinct-org.apache.beam.sdk.values.PCollection-">intersectDistinct</a></span>(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics to compute the
intersection with provided <code>PCollection&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/Flatten.PCollections.html" title="class in org.apache.beam.sdk.transforms">Flatten.PCollections</a>&lt;T&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#unionAll--">unionAll</a></span>()</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics which takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the unionAll
of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#unionAll-org.apache.beam.sdk.values.PCollection-">unionAll</a></span>(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics to compute the
unionAll with provided <code>PCollection&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#unionDistinct--">unionDistinct</a></span>()</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics which takes a
<code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the
union of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/transforms/Sets.html#unionDistinct-org.apache.beam.sdk.values.PCollection-">unionDistinct</a></span>(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</code>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics to compute the
union with provided <code>PCollection&lt;T&gt;</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Sets--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Sets</h4>
<pre>public&nbsp;Sets()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="intersectDistinct-org.apache.beam.sdk.values.PCollection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersectDistinct</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;intersectDistinct(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics to compute the
intersection with provided <code>PCollection&lt;T&gt;</code>.
<p>The argument should not be modified after this is called.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> will all distinct elements that present in
both pipeline is constructed and provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>). Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the input <code>PCollection&lt;T&gt;</code>
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "3", "4", "4", "6"));
PCollection&lt;String&gt; results =
left.apply(SetFns.intersectDistinct(right)); // results will be PCollection&lt;String&gt; containing: "1","3","4"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="intersectDistinct--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersectDistinct</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;intersectDistinct()</pre>
<div class="block">Returns a <code>PTransform</code> that takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a
<code>PCollection&lt;T&gt;</code> containing the intersection of collections done in order for all
collections in <code>PCollectionList&lt;T&gt;</code>.
<p>Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics which takes a
<code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the
intersection of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> will have all distinct elements that are
present in both pipeline is constructed and next <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> in the list and applied to
all collections in order.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the first <code>PCollection&lt;T&gt;</code> in <code>PCollectionList&lt;T&gt;</code>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "3", "4", "4", "6"));
PCollection&lt;String&gt; third = p.apply(Create.of("3", "4", "4"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.intersectDistinct()); // results will be PCollection&lt;String&gt; containing: "3","4"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input <code>PCollectionList&lt;T&gt;</code> and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="intersectAll-org.apache.beam.sdk.values.PCollection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersectAll</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;intersectAll(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics to compute the
intersection with provided <code>PCollection&lt;T&gt;</code>.
<p>The argument should not be modified after this is called.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> which will follow INTESECT_ALL Semantics as
follows: Given there are m elements on pipeline which is constructed <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (left)
and n elements on in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (right): - it will output MIN(m - n, 0)
elements of left for all elements which are present in both left and right.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the input <code>PCollection&lt;T&gt;</code>
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "1", "1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "1", "3", "4", "4", "6"));
PCollection&lt;String&gt; results =
left.apply(SetFns.intersectAll(right)); // results will be PCollection&lt;String&gt; containing: "1","1","3","4"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="intersectAll--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersectAll</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;intersectAll()</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics which takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the
intersection all of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> which will follow INTERSECT_ALL semantics.
Output is calculated as follows: Given there are m elements on pipeline which is constructed
<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (left) and n elements on in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (right): - it will
output MIN(m - n, 0) elements of left for all elements which are present in both left and
right.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the first <code>PCollection&lt;T&gt;</code> in <code>PCollectionList&lt;T&gt;</code>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "1", "1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "1", "3", "4", "4", "6"));
PCollection&lt;String&gt; third = p.apply(Create.of("1", "5"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.intersectAll()); // results will be PCollection&lt;String&gt; containing: "1"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input <code>PCollectionList&lt;T&gt;</code> and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="exceptDistinct-org.apache.beam.sdk.values.PCollection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exceptDistinct</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;exceptDistinct(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics to compute the
difference (except) with provided <code>PCollection&lt;T&gt;</code>.
<p>The argument should not be modified after this is called.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> will all distinct elements that present in
pipeline is constructed but not present in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the input <code>PCollection&lt;T&gt;</code>
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "1", "1", "2", "3", "3","4", "5"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "1", "3", "4", "4", "6"));
PCollection&lt;String&gt; results =
left.apply(SetFns.exceptDistinct(right)); // results will be PCollection&lt;String&gt; containing: "2","5"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="exceptDistinct--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exceptDistinct</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;exceptDistinct()</pre>
<div class="block">Returns a <code>PTransform</code> that takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a
<code>PCollection&lt;T&gt;</code> containing the difference (except) of collections done in order for all
collections in <code>PCollectionList&lt;T&gt;</code>.
<p>Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics which takes a
<code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the
difference (except) of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> will have all distinct elements that are
present in pipeline is constructed but not present in next <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> in the list and
applied to all collections in order.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the first <code>PCollection&lt;T&gt;</code> in <code>PCollectionList&lt;T&gt;</code>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "1", "1", "2", "3", "3", "4", "5"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "1", "3", "4", "4", "6"));
PCollection&lt;String&gt; third = p.apply(Create.of("1", "2", "2"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.exceptDistinct()); // results will be PCollection&lt;String&gt; containing: "5"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input <code>PCollectionList&lt;T&gt;</code> and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="exceptAll-org.apache.beam.sdk.values.PCollection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exceptAll</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;exceptAll(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics to compute the
difference all (exceptAll) with provided <code>PCollection&lt;T&gt;</code>.
<p>The argument should not be modified after this is called.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> which will follow EXCEPT_ALL Semantics as
follows: Given there are m elements on pipeline which is constructed <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (left)
and n elements on in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (right): - it will output m elements of left
for all elements which are present in left but not in right. - it will output MAX(m - n, 0)
elements of left for all elements which are present in both left and right.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the input <code>PCollection&lt;T&gt;</code>
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "1", "1", "2", "3", "3", "3", "4", "5"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "3", "4", "4", "6"));
PCollection&lt;String&gt; results =
left.apply(SetFns.exceptAll(right)); // results will be PCollection&lt;String&gt; containing: "1","1","2","3","3","5"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="exceptAll--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exceptAll</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;exceptAll()</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics which takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the difference
all (exceptAll) of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> which will follow EXCEPT_ALL semantics.
Output is calculated as follows: Given there are m elements on pipeline which is constructed
<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (left) and n elements on in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (right): - it will
output m elements of left for all elements which are present in left but not in right. - it
will output MAX(m - n, 0) elements of left for all elements which are present in both left and
right.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the first <code>PCollection&lt;T&gt;</code> in <code>PCollectionList&lt;T&gt;</code>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "1", "1", "2", "3", "3", "3", "4", "5"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "3", "4", "4", "6"));
PCollection&lt;String&gt; third = p.apply(Create.of("1", "5"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.exceptAll()); // results will be PCollection&lt;String&gt; containing: "1","2","3","3"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input <code>PCollectionList&lt;T&gt;</code> and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="unionDistinct-org.apache.beam.sdk.values.PCollection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unionDistinct</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;unionDistinct(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics to compute the
union with provided <code>PCollection&lt;T&gt;</code>.
<p>The argument should not be modified after this is called.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> will all distinct elements that present in
pipeline is constructed or present in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a>.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the input <code>PCollection&lt;T&gt;</code>
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "1", "2"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "3", "4", "4"));
PCollection&lt;String&gt; results =
left.apply(SetFns.unionDistinct(right)); // results will be PCollection&lt;String&gt; containing: "1","2","3","4"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="unionDistinct--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unionDistinct</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollectionList.html" title="class in org.apache.beam.sdk.values">PCollectionList</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;unionDistinct()</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET DISTINCT semantics which takes a
<code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the
union of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> will have all distinct elements that are
present in pipeline is constructed or present in next <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> in the list and
applied to all collections in order.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the first <code>PCollection&lt;T&gt;</code> in <code>PCollectionList&lt;T&gt;</code>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "1", "2"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "3", "4", "4"));
PCollection&lt;String&gt; third = p.apply(Create.of("1", "5"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.unionDistinct()); // results will be PCollection&lt;String&gt; containing: "1","2","3","4","5"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input <code>PCollectionList&lt;T&gt;</code> and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="unionAll-org.apache.beam.sdk.values.PCollection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unionAll</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/PTransform.html" title="class in org.apache.beam.sdk.transforms">PTransform</a>&lt;<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;,<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&gt;&nbsp;unionAll(<a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values">PCollection</a>&lt;T&gt;&nbsp;rightCollection)</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics to compute the
unionAll with provided <code>PCollection&lt;T&gt;</code>.
<p>The argument should not be modified after this is called.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> which will follow UNION_ALL semantics as
follows: Given there are m elements on pipeline which is constructed <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (left)
and n elements on in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (right): - it will output m elements of left
and m elements of right.
<p>Note that this transform requires that the <code>Coder</code> of the all <code>PCollection&lt;T&gt;</code>
to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the collection <code>Coder</code>
is not deterministic, an exception is thrown at pipeline construction time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the input <code>PCollection&lt;T&gt;</code>
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; left = p.apply(Create.of("1", "1", "2"));
PCollection&lt;String&gt; right = p.apply(Create.of("1", "3", "4", "4"));
PCollection&lt;String&gt; results =
left.apply(SetFns.unionAll(right)); // results will be PCollection&lt;String&gt; containing: "1","1","1","2","3","4","4"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
<a name="unionAll--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unionAll</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/transforms/Flatten.PCollections.html" title="class in org.apache.beam.sdk.transforms">Flatten.PCollections</a>&lt;T&gt;&nbsp;unionAll()</pre>
<div class="block">Returns a new <code>PTransform</code> transform that follows SET ALL semantics which takes a <code>PCollectionList&lt;PCollection&lt;T&gt;&gt;</code> and returns a <code>PCollection&lt;T&gt;</code> containing the unionAll
of collections done in order for all collections in <code>PCollectionList&lt;T&gt;</code>.
<p>The elements of the output <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> which will follow UNION_ALL semantics. Output
is calculated as follows: Given there are m elements on pipeline which is constructed <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (left) and n elements on in provided <a href="../../../../../org/apache/beam/sdk/values/PCollection.html" title="class in org.apache.beam.sdk.values"><code>PCollection</code></a> (right): - it will output
m elements of left and m elements of right.
<p>Note that this transform requires that the <code>Coder</code> of the all inputs <code>PCollection&lt;T&gt;</code> to be deterministic (see <a href="../../../../../org/apache/beam/sdk/coders/Coder.html#verifyDeterministic--"><code>Coder.verifyDeterministic()</code></a>). If the
collection <code>Coder</code> is not deterministic, an exception is thrown at pipeline construction
time.
<p>All inputs must have equal <a href="../../../../../org/apache/beam/sdk/transforms/windowing/WindowFn.html" title="class in org.apache.beam.sdk.transforms.windowing"><code>WindowFn</code></a>s and compatible triggers (see <a href="../../../../../org/apache/beam/sdk/transforms/windowing/Trigger.html#isCompatible-org.apache.beam.sdk.transforms.windowing.Trigger-"><code>Trigger.isCompatible(Trigger)</code></a>).Triggers with multiple firings may lead to nondeterministic
results since the this <code>PTransform</code> is only computed over each individual firing.
<p>By default, the output <code>PCollection&lt;T&gt;</code> encodes its elements using the same <code>Coder</code> as that of the first <code>PCollection&lt;T&gt;</code> in <code>PCollectionList&lt;T&gt;</code>.
<pre><code>
Pipeline p = ...;
PCollection&lt;String&gt; first = p.apply(Create.of("1", "1", "2"));
PCollection&lt;String&gt; second = p.apply(Create.of("1", "3", "4", "4"));
PCollection&lt;String&gt; third = p.apply(Create.of("1", "5"));
// Following example will perform (first intersect second) intersect third.
PCollection&lt;String&gt; results =
PCollectionList.of(first).and(second).and(third)
.apply(SetFns.unionAll()); // results will be PCollection&lt;String&gt; containing: "1","1","1","1","2","3","4","4","5"
</code></pre></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the type of the elements in the input <code>PCollectionList&lt;T&gt;</code> and output <code>PCollection&lt;T&gt;</code>s.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/beam/sdk/transforms/SerializableFunctions.html" title="class in org.apache.beam.sdk.transforms"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/transforms/SimpleFunction.html" title="class in org.apache.beam.sdk.transforms"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/transforms/Sets.html" target="_top">Frames</a></li>
<li><a href="Sets.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>