Package org.apache.flink.api.common.operators.util

Examples of org.apache.flink.api.common.operators.util.FieldSet


      }
      else {
        if (this.nonForwardedFields1.contains(sourceField)) {
          return null;
        } else {
          return new FieldSet(sourceField);
        }
      }
    }
View Full Code Here


      }
      else {
        if (this.nonForwardedFields2.contains(sourceField)) {
          return null;
        } else {
          return new FieldSet(sourceField);
        }
      }
    }
View Full Code Here

      throw new RuntimeException("Either ConstantFields or ConstantFieldsExcept can be specified, not both.");
    }
   
    // extract notConstantSet from annotation
    if (notConstantSet != null) {
      FieldSet nonConstant = new FieldSet(notConstantSet.value());
      return new ImplicitlyForwardingSingleInputSemanticProperties(nonConstant);
    }
   
    // extract notConstantSet from annotation
    if (allConstants != null) {
      FieldSet nonConstant = new FieldSet();
      return new ImplicitlyForwardingSingleInputSemanticProperties(nonConstant);
    }
   
    SingleInputSemanticProperties semanticProperties = new SingleInputSemanticProperties();
   
View Full Code Here

    }
   
   
    // extract readSets from annotations
    if(notConstantSet1Annotation != null) {
      semanticProperties.setImplicitlyForwardingFirstExcept(new FieldSet(notConstantSet1Annotation.value()));
    }
   
    if(notConstantSet2Annotation != null) {
      semanticProperties.setImplicitlyForwardingSecondExcept(new FieldSet(notConstantSet2Annotation.value()));
    }
   
    // extract readSets from annotations
    if (constantSet1Annotation != null) {
      for(int value: constantSet1Annotation.value()) {
View Full Code Here

    @Override
    public FieldSet getForwardedField(int sourceField) {
      if (this.nonForwardedFields.contains(sourceField)) {
        return null;
      } else {
        return new FieldSet(sourceField);
      }
    }
View Full Code Here

public class FieldSetTest {
 
  @Test
  public void testFieldSetConstructors() {
    check(new FieldSet());
    check(FieldSet.EMPTY_SET);
    check(new FieldSet(14), 14);
    check(new FieldSet(new Integer(3)), 3);
    check(new FieldSet(7, 4, 1), 1, 4, 7);
    check(new FieldSet(7, 4, 1, 4, 7, 1, 4, 2), 1, 4, 2, 7);
  }
View Full Code Here

    check(new FieldSet(7, 4, 1, 4, 7, 1, 4, 2), 1, 4, 2, 7);
  }
 
  @Test
  public void testFieldSetAdds() {
    check(new FieldSet().addField(1).addField(2), 1, 2);
    check(FieldSet.EMPTY_SET.addField(3).addField(2), 3, 2);
    check(new FieldSet(13).addFields(new FieldSet(17, 31, 42)), 17, 13, 42, 31);
    check(new FieldSet(14).addFields(new FieldSet(17)), 17, 14);
    check(new FieldSet(3).addFields(2, 8, 5, 7), 3, 2, 8, 5, 7);
    check(new FieldSet().addFields(new FieldSet()));
    check(new FieldSet().addFields(new FieldSet(3, 4)), 4, 3);
    check(new FieldSet(5, 1).addFields(new FieldSet()), 5, 1);
  }
View Full Code Here

    check(new FieldSet(5, 1).addFields(new FieldSet()), 5, 1);
  }
 
  @Test
  public void testImmutability() {
    FieldSet s1 = new FieldSet();
    FieldSet s2 = new FieldSet(5);
    FieldSet s3 = new FieldSet(new Integer(7));
    FieldSet s4 = new FieldSet(5, 4, 7, 6);
   
    s1.addFields(s2).addFields(s3);
    s2.addFields(s4);
    s4.addFields(s1);
   
    s1.addField(new Integer(14));
    s2.addFields(78, 13, 66, 3);
   
    assertEquals(0, s1.size());
    assertEquals(1, s2.size());
    assertEquals(1, s3.size());
    assertEquals(4, s4.size());
  }
View Full Code Here

    assertEquals(4, s4.size());
  }
 
  @Test
  public void testAddListToSet() {
    check(new FieldSet().addField(1).addFields(new FieldList(14, 3, 1)), 1, 3, 14);
  }
View Full Code Here

    assertEquals(4, s4.size());
  }
 
  @Test
  public void testAddSetToList() {
    check(new FieldList().addFields(new FieldSet(1)).addFields(2), 1, 2);
    check(new FieldList().addFields(1).addFields(new FieldSet(2)), 1, 2);
    check(new FieldList().addFields(new FieldSet(2)), 2);
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.api.common.operators.util.FieldSet

Copyright © 2018 www.massapicom. 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.