001    /*
002     * Copyright (c) 2007-2014 Concurrent, Inc. All Rights Reserved.
003     *
004     * Project and contact information: http://www.cascading.org/
005     *
006     * This file is part of the Cascading project.
007     *
008     * Licensed under the Apache License, Version 2.0 (the "License");
009     * you may not use this file except in compliance with the License.
010     * You may obtain a copy of the License at
011     *
012     *     http://www.apache.org/licenses/LICENSE-2.0
013     *
014     * Unless required by applicable law or agreed to in writing, software
015     * distributed under the License is distributed on an "AS IS" BASIS,
016     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017     * See the License for the specific language governing permissions and
018     * limitations under the License.
019     */
020    
021    package cascading.pipe;
022    
023    import java.beans.ConstructorProperties;
024    
025    import cascading.pipe.joiner.Joiner;
026    import cascading.tuple.Fields;
027    
028    /**
029     * The CoGroup pipe allows for two or more tuple streams to join into a single stream via an optional {@link Joiner}.
030     * <p/>
031     * If followed by an assembly of {@link Every}s to execute one or more {@link cascading.operation.Aggregator}s,
032     * they will be guaranteed to receive all values associated with a
033     * unique grouping key. In the case of a MapReduce platform, this invokes a {@code Reduce} task to guarantee
034     * all values are associated with a given unique grouping key.
035     * <p/>
036     * If no aggregations are to be performed, and one or more streams of data are small (may fit in reasonable memory),
037     * see the {@link HashJoin} Pipe for partially non-blocking joins.
038     * <p/>
039     * For every incoming {@link Pipe} instance, a {@link Fields} instance must be specified that denotes the field names
040     * or positions that should be co-grouped with the other given Pipe instances. If the incoming Pipe instances declare
041     * one or more field with the same name, the declaredFields must be given to name all the outgoing Tuple stream fields
042     * to overcome field name collisions. That is, if the first pipe has 4 fields, and the second pipe has 3 fields, 7 fields
043     * total must be declared having unique field names, if any.
044     * <p/>
045     * {@code resultGroupFields} value is a convenience allowing the override of the resulting grouping field names. The
046     * size of resultGroupFields must be equal to the total number of grouping keys fields. That is, if joining on two pipes
047     * which are grouping on two keys, the resultGroupFields must be 4 fields, each field field name being unique, if any.
048     * By default, the resultGroupKeys are retrieved from the declaredFields.
049     * <p/>
050     * By default CoGroup performs an inner join via the {@link cascading.pipe.joiner.InnerJoin}
051     * {@link cascading.pipe.joiner.Joiner} class.
052     * <p/>
053     * To implement a custom join, implement the {@link Joiner} interface. Or, as of Cascading 2.5, use a
054     * {@link cascading.pipe.joiner.BufferJoin} and implement the join in a {@link cascading.operation.Buffer}.
055     * <p/>
056     * Self joins can be achieved by using a constructor that takes a single Pipe and a numSelfJoins value. A value of
057     * 1 for numSelfJoins will join the Pipe with itself once.
058     * <p/>
059     * The outgoing grouping Tuple stream is sorted by the natural order of the grouping fields. To control this order,
060     * at least the first groupingFields value given should be an instance of {@link cascading.tuple.Fields} containing
061     * {@link java.util.Comparator} instances for the appropriate fields.
062     * This allows fine grained control of the sort grouping order.
063     * <p/>
064     * CoGrouping does not scale well when implemented over MapReduce. In Cascading there are two
065     * ways to optimize CoGrouping.
066     * <p/>
067     * The first is to consider the order of the pipes handed to the CoGroup constructor.
068     * <p/>
069     * During co-grouping, for any given unique grouping key, all of the rightmost pipes will accumulate the current
070     * grouping values into memory so they may be iterated across for every value in the left hand side pipe. During
071     * the accumulation step, if the number of values exceeds the {@link cascading.tuple.collect.SpillableTupleList} threshold
072     * value, those values will be spilled to disk so the accumulation may continue.
073     * <p/>
074     * See the {@link cascading.tuple.collect.TupleCollectionFactory} and {@link cascading.tuple.collect.TupleMapFactory} for a means
075     * to use alternative spillable types.
076     * <p/>
077     * There is no accumulation for the left hand side pipe, only for those to the "right".
078     * <p/>
079     * Thus, for the pipe that has the largest number of values per unique key grouping, on average, it should be made the
080     * "left hand side" pipe ({@code lhs}). And all remaining pipes should be the on the "right hand side" ({@code rhs}) to
081     * prevent the likelihood of a spill and to reduce the blocking associated with accumulating the values. If using
082     * the {@code Pipe[]} constructor, {@code Pipe[0]} is the left hand sided pipe.
083     * <p/>
084     * If spills are happening, consider increasing the spill threshold, see {@link cascading.tuple.collect.SpillableTupleList},
085     * if more RAM is available. See the logs for hints on how much more these values can be increased, if any.
086     * <p/>
087     * Spills are intended to prevent {@link OutOfMemoryError}'s, so reducing the number of spills is important by
088     * increasing the threshold, but memory errors aren't recoverable, so the correct balance will need to be found.
089     * <p/>
090     * To customize the spill values for a given CoGroup only, see {@link #getStepConfigDef()}.
091     * <p/>
092     * See the {@link cascading.tuple.Hasher} interface when a custom {@link java.util.Comparator} on the grouping keys is
093     * being provided that makes two values with differing hashCode values equal. For example,
094     * {@code new BigDecimal( 100.0D )} and {@code new Double 100.0D )} are equal using a custom Comparator, but
095     * {@link Object#hashCode()} will be different, thus forcing each value into differing partitions.
096     * <p/>
097     * Currently "non-equi-joins" are not supported via the Hasher and Comparator interfaces. That is, joining one String
098     * key with a lowercase value with another String key with an uppercase value using a "case insensitive" Comparator
099     * will not have consistent results. The join will execute and be correct, but the actual values in the key columns may
100     * be replaced with "equivalent" values from other streams.
101     * <p/>
102     * If the original key values must be retained, consider normalizing the keys with a Function and then joining on the
103     * resulting field.
104     *
105     * @see cascading.pipe.joiner.InnerJoin
106     * @see cascading.pipe.joiner.OuterJoin
107     * @see cascading.pipe.joiner.LeftJoin
108     * @see cascading.pipe.joiner.RightJoin
109     * @see cascading.pipe.joiner.MixedJoin
110     * @see cascading.pipe.joiner.BufferJoin
111     * @see cascading.tuple.Fields
112     * @see cascading.tuple.collect.SpillableTupleList
113     */
114    public class CoGroup extends Splice implements Group
115      {
116      /**
117       * Constructor CoGroup creates a new CoGroup instance.
118       *
119       * @param lhs            of type Pipe
120       * @param lhsGroupFields of type Fields
121       * @param rhs            of type Pipe
122       * @param rhsGroupFields of type Fields
123       * @param declaredFields of type Fields
124       */
125      @ConstructorProperties({"lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields"})
126      public CoGroup( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields )
127        {
128        super( lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields );
129        }
130    
131      /**
132       * Constructor CoGroup creates a new CoGroup instance.
133       *
134       * @param lhs               of type Pipe
135       * @param lhsGroupFields    of type Fields
136       * @param rhs               of type Pipe
137       * @param rhsGroupFields    of type Fields
138       * @param declaredFields    of type Fields
139       * @param resultGroupFields of type Fields
140       */
141      @ConstructorProperties({"lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields", "resultGroupFields"})
142      public CoGroup( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Fields resultGroupFields )
143        {
144        super( lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields, resultGroupFields );
145        }
146    
147      /**
148       * Constructor CoGroup creates a new CoGroup instance.
149       *
150       * @param lhs            of type Pipe
151       * @param lhsGroupFields of type Fields
152       * @param rhs            of type Pipe
153       * @param rhsGroupFields of type Fields
154       * @param declaredFields of type Fields
155       * @param joiner         of type CoGrouper
156       */
157      @ConstructorProperties({"lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields", "joiner"})
158      public CoGroup( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Joiner joiner )
159        {
160        super( lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields, joiner );
161        }
162    
163      /**
164       * Constructor CoGroup creates a new CoGroup instance.
165       *
166       * @param lhs               of type Pipe
167       * @param lhsGroupFields    of type Fields
168       * @param rhs               of type Pipe
169       * @param rhsGroupFields    of type Fields
170       * @param declaredFields    of type Fields
171       * @param resultGroupFields of type Fields
172       * @param joiner            of type Joiner
173       */
174      @ConstructorProperties({"lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields", "resultGroupFields",
175                              "joiner"})
176      public CoGroup( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Fields resultGroupFields, Joiner joiner )
177        {
178        super( lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields, resultGroupFields, joiner );
179        }
180    
181      /**
182       * Constructor CoGroup creates a new CoGroup instance.
183       *
184       * @param lhs            of type Pipe
185       * @param lhsGroupFields of type Fields
186       * @param rhs            of type Pipe
187       * @param rhsGroupFields of type Fields
188       * @param joiner         of type CoGrouper
189       */
190      @ConstructorProperties({"lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "joiner"})
191      public CoGroup( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Joiner joiner )
192        {
193        super( lhs, lhsGroupFields, rhs, rhsGroupFields, joiner );
194        }
195    
196      /**
197       * Constructor CoGroup creates a new CoGroup instance.
198       *
199       * @param lhs            of type Pipe
200       * @param lhsGroupFields of type Fields
201       * @param rhs            of type Pipe
202       * @param rhsGroupFields of type Fields
203       */
204      @ConstructorProperties({"lhs", "lhsGroupFields", "rhs", "rhsGroupFields"})
205      public CoGroup( Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields )
206        {
207        super( lhs, lhsGroupFields, rhs, rhsGroupFields );
208        }
209    
210      /**
211       * Constructor CoGroup creates a new CoGroup instance.
212       *
213       * @param pipes of type Pipe...
214       */
215      @ConstructorProperties({"pipes"})
216      public CoGroup( Pipe... pipes )
217        {
218        super( pipes );
219        }
220    
221      /**
222       * Constructor CoGroup creates a new CoGroup instance.
223       *
224       * @param pipes       of type Pipe[]
225       * @param groupFields of type Fields[]
226       */
227      @ConstructorProperties({"pipes", "groupFields"})
228      public CoGroup( Pipe[] pipes, Fields[] groupFields )
229        {
230        super( pipes, groupFields );
231        }
232    
233      /**
234       * Constructor CoGroup creates a new CoGroup instance.
235       *
236       * @param pipes          of type Pipe[]
237       * @param groupFields    of type Fields[]
238       * @param declaredFields of type Fields
239       * @param joiner         of type CoGrouper
240       */
241      @ConstructorProperties({"pipes", "groupFields", "declaredFields", "joiner"})
242      public CoGroup( Pipe[] pipes, Fields[] groupFields, Fields declaredFields, Joiner joiner )
243        {
244        super( pipes, groupFields, declaredFields, joiner );
245        }
246    
247      /**
248       * Constructor CoGroup creates a new CoGroup instance.
249       *
250       * @param pipes             of type Pipe[]
251       * @param groupFields       of type Fields[]
252       * @param declaredFields    of type Fields
253       * @param resultGroupFields of type Fields
254       * @param joiner            of type Joiner
255       */
256      @ConstructorProperties({"pipes", "groupFields", "declaredFields", "resultGroupFields", "joiner"})
257      public CoGroup( Pipe[] pipes, Fields[] groupFields, Fields declaredFields, Fields resultGroupFields, Joiner joiner )
258        {
259        super( pipes, groupFields, declaredFields, resultGroupFields, joiner );
260        }
261    
262      /**
263       * Constructor CoGroup creates a new CoGroup instance.
264       *
265       * @param groupName   of type String
266       * @param pipes       of type Pipe[]
267       * @param groupFields of type Fields[]
268       */
269      @ConstructorProperties({"groupName", "pipes", "groupFields"})
270      public CoGroup( String groupName, Pipe[] pipes, Fields[] groupFields )
271        {
272        super( groupName, pipes, groupFields );
273        }
274    
275      /**
276       * Constructor CoGroup creates a new CoGroup instance.
277       *
278       * @param groupName      of type String
279       * @param pipes          of type Pipe[]
280       * @param groupFields    of type Fields[]
281       * @param declaredFields of type Fields
282       */
283      @ConstructorProperties({"groupName", "pipes", "groupFields", "declaredFields"})
284      public CoGroup( String groupName, Pipe[] pipes, Fields[] groupFields, Fields declaredFields )
285        {
286        super( groupName, pipes, groupFields, declaredFields );
287        }
288    
289      /**
290       * Constructor CoGroup creates a new CoGroup instance.
291       *
292       * @param groupName         of type String
293       * @param pipes             of type Pipe[]
294       * @param groupFields       of type Fields[]
295       * @param declaredFields    of type Fields
296       * @param resultGroupFields of type Fields
297       */
298      @ConstructorProperties({"groupName", "pipes", "groupFields", "declaredFields", "resultGroupFields"})
299      public CoGroup( String groupName, Pipe[] pipes, Fields[] groupFields, Fields declaredFields, Fields resultGroupFields )
300        {
301        super( groupName, pipes, groupFields, declaredFields, resultGroupFields );
302        }
303    
304      /**
305       * Constructor CoGroup creates a new CoGroup instance.
306       *
307       * @param groupName      of type String
308       * @param pipes          of type Pipe[]
309       * @param groupFields    of type Fields[]
310       * @param declaredFields of type Fields
311       * @param joiner         of type CoGrouper
312       */
313      @ConstructorProperties({"groupName", "pipes", "groupFields", "declaredFields", "joiner"})
314      public CoGroup( String groupName, Pipe[] pipes, Fields[] groupFields, Fields declaredFields, Joiner joiner )
315        {
316        super( groupName, pipes, groupFields, declaredFields, null, joiner );
317        }
318    
319      /**
320       * Constructor CoGroup creates a new CoGroup instance.
321       *
322       * @param groupName         of type String
323       * @param pipes             of type Pipe[]
324       * @param groupFields       of type Fields[]
325       * @param declaredFields    of type Fields
326       * @param resultGroupFields of type Fields
327       * @param joiner            of type CoGrouper
328       */
329      @ConstructorProperties({"groupName", "pipes", "groupFields", "declaredFields", "resultGroupFields", "joiner"})
330      public CoGroup( String groupName, Pipe[] pipes, Fields[] groupFields, Fields declaredFields, Fields resultGroupFields, Joiner joiner )
331        {
332        super( groupName, pipes, groupFields, declaredFields, resultGroupFields, joiner );
333        }
334    
335      /**
336       * Constructor CoGroup creates a new CoGroup instance.
337       *
338       * @param groupName      of type String
339       * @param lhs            of type Pipe
340       * @param lhsGroupFields of type Fields
341       * @param rhs            of type Pipe
342       * @param rhsGroupFields of type Fields
343       * @param declaredFields of type Fields
344       */
345      @ConstructorProperties({"groupName", "lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields"})
346      public CoGroup( String groupName, Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields )
347        {
348        super( groupName, lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields );
349        }
350    
351      /**
352       * Constructor CoGroup creates a new CoGroup instance.
353       *
354       * @param groupName         of type String
355       * @param lhs               of type Pipe
356       * @param lhsGroupFields    of type Fields
357       * @param rhs               of type Pipe
358       * @param rhsGroupFields    of type Fields
359       * @param declaredFields    of type Fields
360       * @param resultGroupFields of type Fields
361       */
362      @ConstructorProperties({"groupName", "lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields",
363                              "resultGroupFields"})
364      public CoGroup( String groupName, Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Fields resultGroupFields )
365        {
366        super( groupName, lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields, resultGroupFields );
367        }
368    
369      /**
370       * Constructor CoGroup creates a new CoGroup instance.
371       *
372       * @param groupName      of type String
373       * @param lhs            of type Pipe
374       * @param lhsGroupFields of type Fields
375       * @param rhs            of type Pipe
376       * @param rhsGroupFields of type Fields
377       * @param declaredFields of type Fields
378       * @param joiner         of type CoGrouper
379       */
380      @ConstructorProperties({"groupName", "lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields", "joiner"})
381      public CoGroup( String groupName, Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Joiner joiner )
382        {
383        super( groupName, lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields, joiner );
384        }
385    
386      /**
387       * Constructor CoGroup creates a new CoGroup instance.
388       *
389       * @param groupName         of type String
390       * @param lhs               of type Pipe
391       * @param lhsGroupFields    of type Fields
392       * @param rhs               of type Pipe
393       * @param rhsGroupFields    of type Fields
394       * @param declaredFields    of type Fields
395       * @param resultGroupFields of type Fields
396       * @param joiner            of type Joiner
397       */
398      @ConstructorProperties({"groupName", "lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "declaredFields",
399                              "resultGroupFields", "joiner"})
400      public CoGroup( String groupName, Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Fields declaredFields, Fields resultGroupFields, Joiner joiner )
401        {
402        super( groupName, lhs, lhsGroupFields, rhs, rhsGroupFields, declaredFields, resultGroupFields, joiner );
403        }
404    
405      /**
406       * Constructor CoGroup creates a new CoGroup instance.
407       *
408       * @param groupName      of type String
409       * @param lhs            of type Pipe
410       * @param lhsGroupFields of type Fields
411       * @param rhs            of type Pipe
412       * @param rhsGroupFields of type Fields
413       * @param joiner         of type CoGrouper
414       */
415      @ConstructorProperties({"groupName", "lhs", "lhsGroupFields", "rhs", "rhsGroupFields", "joiner"})
416      public CoGroup( String groupName, Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields, Joiner joiner )
417        {
418        super( groupName, lhs, lhsGroupFields, rhs, rhsGroupFields, joiner );
419        }
420    
421      /**
422       * Constructor CoGroup creates a new CoGroup instance.
423       *
424       * @param groupName      of type String
425       * @param lhs            of type Pipe
426       * @param lhsGroupFields of type Fields
427       * @param rhs            of type Pipe
428       * @param rhsGroupFields of type Fields
429       */
430      @ConstructorProperties({"groupName", "lhs", "lhsGroupFields", "rhs", "rhsGroupFields"})
431      public CoGroup( String groupName, Pipe lhs, Fields lhsGroupFields, Pipe rhs, Fields rhsGroupFields )
432        {
433        super( groupName, lhs, lhsGroupFields, rhs, rhsGroupFields );
434        }
435    
436      /**
437       * Constructor CoGroup creates a new CoGroup instance.
438       *
439       * @param groupName of type String
440       * @param pipes     of type Pipe...
441       */
442      @ConstructorProperties({"groupName", "pipes"})
443      public CoGroup( String groupName, Pipe... pipes )
444        {
445        super( groupName, pipes );
446        }
447    
448      /**
449       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
450       * given {@link Pipe} instance.
451       *
452       * @param pipe           of type Pipe
453       * @param groupFields    of type Fields
454       * @param numSelfJoins   of type int
455       * @param declaredFields of type Fields
456       */
457      @ConstructorProperties({"pipe", "groupFields", "numSelfJoins", "declaredFields"})
458      public CoGroup( Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields )
459        {
460        super( pipe, groupFields, numSelfJoins, declaredFields );
461        }
462    
463      /**
464       * Constructor CoGroup creates a new CoGroup instance.
465       *
466       * @param pipe              of type Pipe
467       * @param groupFields       of type Fields
468       * @param numSelfJoins      of type int
469       * @param declaredFields    of type Fields
470       * @param resultGroupFields of type Fields
471       */
472      @ConstructorProperties({"pipe", "groupFields", "numSelfJoins", "declaredFields", "resultGroupFields"})
473      public CoGroup( Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields, Fields resultGroupFields )
474        {
475        super( pipe, groupFields, numSelfJoins, declaredFields, resultGroupFields );
476        }
477    
478      /**
479       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
480       * given {@link Pipe} instance.
481       *
482       * @param pipe           of type Pipe
483       * @param groupFields    of type Fields
484       * @param numSelfJoins   of type int
485       * @param declaredFields of type Fields
486       * @param joiner         of type CoGrouper
487       */
488      @ConstructorProperties({"pipe", "groupFields", "numSelfJoins", "declaredFields", "joiner"})
489      public CoGroup( Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields, Joiner joiner )
490        {
491        super( pipe, groupFields, numSelfJoins, declaredFields, joiner );
492        }
493    
494      /**
495       * Constructor CoGroup creates a new CoGroup instance.
496       *
497       * @param pipe              of type Pipe
498       * @param groupFields       of type Fields
499       * @param numSelfJoins      of type int
500       * @param declaredFields    of type Fields
501       * @param resultGroupFields of type Fields
502       * @param joiner            of type Joiner
503       */
504      @ConstructorProperties({"pipe", "groupFields", "numSelfJoins", "declaredFields", "resultGroupFields", "joiner"})
505      public CoGroup( Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields, Fields resultGroupFields, Joiner joiner )
506        {
507        super( pipe, groupFields, numSelfJoins, declaredFields, resultGroupFields, joiner );
508        }
509    
510      /**
511       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
512       * given {@link Pipe} instance.
513       *
514       * @param pipe         of type Pipe
515       * @param groupFields  of type Fields
516       * @param numSelfJoins of type int
517       * @param joiner       of type CoGrouper
518       */
519      @ConstructorProperties({"pipe", "groupFields", "numSelfJoins", "joiner"})
520      public CoGroup( Pipe pipe, Fields groupFields, int numSelfJoins, Joiner joiner )
521        {
522        super( pipe, groupFields, numSelfJoins, joiner );
523        }
524    
525      /**
526       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
527       * given {@link Pipe} instance.
528       *
529       * @param pipe         of type Pipe
530       * @param groupFields  of type Fields
531       * @param numSelfJoins of type int
532       */
533      @ConstructorProperties({"pipe", "groupFields", "numSelfJoins"})
534      public CoGroup( Pipe pipe, Fields groupFields, int numSelfJoins )
535        {
536        super( pipe, groupFields, numSelfJoins );
537        }
538    
539      /**
540       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
541       * given {@link Pipe} instance.
542       *
543       * @param groupName      of type String
544       * @param pipe           of type Pipe
545       * @param groupFields    of type Fields
546       * @param numSelfJoins   of type int
547       * @param declaredFields of type Fields
548       */
549      @ConstructorProperties({"groupName", "pipe", "groupFields", "numSelfJoins", "declaredFields"})
550      public CoGroup( String groupName, Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields )
551        {
552        super( groupName, pipe, groupFields, numSelfJoins, declaredFields );
553        }
554    
555      /**
556       * Constructor CoGroup creates a new CoGroup instance.
557       *
558       * @param groupName         of type String
559       * @param pipe              of type Pipe
560       * @param groupFields       of type Fields
561       * @param numSelfJoins      of type int
562       * @param declaredFields    of type Fields
563       * @param resultGroupFields of type Fields
564       */
565      @ConstructorProperties({"groupName", "pipe", "groupFields", "numSelfJoins", "declaredFields", "resultGroupFields"})
566      public CoGroup( String groupName, Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields, Fields resultGroupFields )
567        {
568        super( groupName, pipe, groupFields, numSelfJoins, declaredFields, resultGroupFields );
569        }
570    
571      /**
572       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
573       * given {@link Pipe} instance.
574       *
575       * @param groupName      of type String
576       * @param pipe           of type Pipe
577       * @param groupFields    of type Fields
578       * @param numSelfJoins   of type int
579       * @param declaredFields of type Fields
580       * @param joiner         of type CoGrouper
581       */
582      @ConstructorProperties({"groupName", "pipe", "groupFields", "numSelfJoins", "declaredFields", "joiner"})
583      public CoGroup( String groupName, Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields, Joiner joiner )
584        {
585        super( groupName, pipe, groupFields, numSelfJoins, declaredFields, joiner );
586        }
587    
588      /**
589       * Constructor CoGroup creates a new CoGroup instance.
590       *
591       * @param groupName         of type String
592       * @param pipe              of type Pipe
593       * @param groupFields       of type Fields
594       * @param numSelfJoins      of type int
595       * @param declaredFields    of type Fields
596       * @param resultGroupFields of type Fields
597       * @param joiner            of type Joiner
598       */
599      @ConstructorProperties({"groupName", "pipe", "groupFields", "numSelfJoins", "declaredFields", "resultGroupFields",
600                              "joiner"})
601      public CoGroup( String groupName, Pipe pipe, Fields groupFields, int numSelfJoins, Fields declaredFields, Fields resultGroupFields, Joiner joiner )
602        {
603        super( groupName, pipe, groupFields, numSelfJoins, declaredFields, resultGroupFields, joiner );
604        }
605    
606      /**
607       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
608       * given {@link Pipe} instance.
609       *
610       * @param groupName    of type String
611       * @param pipe         of type Pipe
612       * @param groupFields  of type Fields
613       * @param numSelfJoins of type int
614       * @param joiner       of type CoGrouper
615       */
616      @ConstructorProperties({"groupName", "pipe", "groupFields", "numSelfJoins", "joiner"})
617      public CoGroup( String groupName, Pipe pipe, Fields groupFields, int numSelfJoins, Joiner joiner )
618        {
619        super( groupName, pipe, groupFields, numSelfJoins, joiner );
620        }
621    
622      /**
623       * Constructor CoGroup creates a new CoGroup instance that performs numSelfJoins number of self joins on the
624       * given {@link Pipe} instance.
625       *
626       * @param groupName    of type String
627       * @param pipe         of type Pipe
628       * @param groupFields  of type Fields
629       * @param numSelfJoins of type int
630       */
631      @ConstructorProperties({"groupName", "pipe", "groupFields", "numSelfJoins"})
632      public CoGroup( String groupName, Pipe pipe, Fields groupFields, int numSelfJoins )
633        {
634        super( groupName, pipe, groupFields, numSelfJoins );
635        }
636      }