Skip to content

Commit

Permalink
refactored joiners into own package
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensel committed Feb 9, 2012
1 parent 3a9145c commit fc884ff
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions src/java/multitool/factory/CoGroupFactory.java
@@ -1,22 +1,21 @@
/*
* Copyright (c) 2009-2011 Concurrent, Inc. All Rights Reserved.
* Copyright (c) 2007-2012 Concurrent, Inc. All Rights Reserved.
*
* Project and contact information: http://www.cascading.org/
*
* This file is part of the Cascading project.
*
* Cascading is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Cascading is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* http://www.apache.org/licenses/LICENSE-2.0
*
* You should have received a copy of the GNU General Public License
* along with Cascading. If not, see <http://www.gnu.org/licenses/>.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package multitool.factory;
Expand All @@ -25,11 +24,11 @@

import cascading.pipe.CoGroup;
import cascading.pipe.Pipe;
import cascading.pipe.cogroup.InnerJoin;
import cascading.pipe.cogroup.Joiner;
import cascading.pipe.cogroup.LeftJoin;
import cascading.pipe.cogroup.OuterJoin;
import cascading.pipe.cogroup.RightJoin;
import cascading.pipe.joiner.InnerJoin;
import cascading.pipe.joiner.Joiner;
import cascading.pipe.joiner.LeftJoin;
import cascading.pipe.joiner.OuterJoin;
import cascading.pipe.joiner.RightJoin;
import cascading.tuple.Fields;

/**
Expand Down Expand Up @@ -90,11 +89,11 @@ public Pipe addAssembly( String value, Map<String, String> subParams, Map<String
else if( join.equalsIgnoreCase( "outer" ) )
joiner = new OuterJoin();
else if( join.equalsIgnoreCase( "left" ) )
joiner = new LeftJoin();
else if( join.equalsIgnoreCase( "right" ) )
joiner = new RightJoin();
else
throw new IllegalArgumentException( "unknown join type: " + join );
joiner = new LeftJoin();
else if( join.equalsIgnoreCase( "right" ) )
joiner = new RightJoin();
else
throw new IllegalArgumentException( "unknown join type: " + join );


return new CoGroup( lhsPipe, lhsFields, rhsPipe, rhsFields, joiner );
Expand Down

0 comments on commit fc884ff

Please sign in to comment.