Examples of Retain


Examples of cascading.pipe.assembly.Retain

    Map<String, Tap> sources = new HashMap<String, Tap>();
    sources.put("s1", source1);
    sources.put("s2", source2);

    Pipe s1 = new Pipe("s1");
    s1 = new Retain(s1, new Fields("key", "num"));

    Pipe s2 = new Pipe("s2");
    s2 = new Retain(s2, new Fields("key", "num1", "num2"));

    Pipe results = new MultiGroupBy(s1, new Fields("key"), s2, new Fields("key"),
        new Fields("key-rename"), new CustomBuffer(new Fields("result")));

    CascadingUtil.get().getFlowConnector().connect(sources, sink, results).complete();
View Full Code Here

Examples of cascading.pipe.assembly.Retain

    if( groupFields.isNone() ) // not grouping, just appending tuples into a single row
      join = new HashJoin( name, pipes, groupFieldsArray, declaredFields, new InnerJoin() );
    else
      join = new CoGroup( name, pipes, groupFieldsArray, declaredFields, new InnerJoin() );

    join = new Retain( join, outgoingNamedFields );

    join = stack.addDebug( this, join );

    return new Branch( join, branch );
    }
View Full Code Here

Examples of cascading.pipe.assembly.Retain

      Fields aggResultFields = makeFieldsFor( aggCall );

      Pipe current = previous;

      current = new Retain( current, uniqueFields );
      current = new Unique( aggResultFields.toString(), current, uniqueFields, Unique.Include.NO_NULLS );

      current = stack.addDebug( this, current );

      if( aggregationName.equals( "COUNT" ) )
View Full Code Here

Examples of cascading.pipe.assembly.Retain

    }

  private static Pipe addRetain( RelOptCluster cluster, RexProgram program, Pipe pipe )
    {
    Fields resultFields = createTypedFields( cluster, program.getOutputRowType(), false );
    return new Retain( pipe, resultFields );
    }
View Full Code Here

Examples of com.google.collide.dto.DocOpComponent.Retain

      case INSERT:
        visitor.insert(((Insert) component).getText());
        break;

      case RETAIN:
        Retain retain = (Retain) component;
        visitor.retain(retain.getCount(), retain.hasTrailingNewline());
        break;

      case RETAIN_LINE:
        visitor.retainLine(((RetainLine) component).getLineCount());
        break;
View Full Code Here

Examples of com.google.collide.dto.DocOpComponent.Retain

      case INSERT:
        String insertText = ((Insert) component).getText();
        return "I(" + toStringForComponentText(insertText, verbose) + ")";

      case RETAIN:
        Retain retain = (Retain) component;
        return "R(" + (retain.hasTrailingNewline() ? (retain.getCount() - 1) + "\\n" : ""
            + retain.getCount()) + ")";

      case RETAIN_LINE:
        return "RL(" + ((RetainLine) component).getLineCount() + ")";

      default:
View Full Code Here

Examples of com.google.collide.dto.DocOpComponent.Retain

  public static void assertRetain(int expectedRetainCount, boolean expectedHasTrailingNewline,
      DocOp op, int index) {
    DocOpComponent component = op.getComponents().get(index);
    assertEquals(RETAIN, component.getType());
    Retain retain = (Retain) component;
    assertEquals(expectedRetainCount, retain.getCount());
    assertEquals(expectedHasTrailingNewline, retain.hasTrailingNewline());
  }
View Full Code Here

Examples of org.apache.tapestry.annotations.Retain

        replay();

        ClassTransformation ct = createClassTransformation(ParentClass.class, log);

        Retain retain = ct.getFieldAnnotation("_annotatedField", Retain.class);

        assertNotNull(retain);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.Retain

        replay();

        ClassTransformation ct = createClassTransformation(ParentClass.class, logger);

        Retain retain = ct.getFieldAnnotation("_annotatedField", Retain.class);

        assertNotNull(retain);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.Retain

    @Test
    public void normal()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Retain annotation = newMock(Retain.class);

        train_findFieldsWithAnnotation(ct, Retain.class, "fred");

        train_getFieldAnnotation(ct, "fred", Retain.class, annotation);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.