Examples of nulls()


Examples of org.apache.crunch.types.PTypeFamily.nulls()

      PCollection<Tuple4<V1, V2, V3, V4>> collection, ColumnOrder... columnOrders) {
    PTypeFamily tf = collection.getTypeFamily();
    PType<Tuple4<V1, V2, V3, V4>> pType = collection.getPType();
    @SuppressWarnings("unchecked")
    PTableType<Tuple4<V1, V2, V3, V4>, Void> type = tf.tableOf(tf.quads(pType.getSubTypes().get(0), pType.getSubTypes()
        .get(1), pType.getSubTypes().get(2), pType.getSubTypes().get(3)), tf.nulls());
    PTable<Tuple4<V1, V2, V3, V4>, Void> pt = collection.parallelDo(
        new DoFn<Tuple4<V1, V2, V3, V4>, Pair<Tuple4<V1, V2, V3, V4>, Void>>() {
          @Override
          public void process(Tuple4<V1, V2, V3, V4> input, Emitter<Pair<Tuple4<V1, V2, V3, V4>, Void>> emitter) {
            emitter.emit(Pair.of(input, (Void) null));
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.nulls()

   * @return a {@link PCollection} representing the sorted collection.
   */
  public static PCollection<TupleN> sortTuples(PCollection<TupleN> collection, ColumnOrder... columnOrders) {
    PTypeFamily tf = collection.getTypeFamily();
    PType<TupleN> pType = collection.getPType();
    PTableType<TupleN, Void> type = tf.tableOf(tf.tuples(pType.getSubTypes().toArray(new PType[0])), tf.nulls());
    PTable<TupleN, Void> pt = collection.parallelDo(new DoFn<TupleN, Pair<TupleN, Void>>() {
      @Override
      public void process(TupleN input, Emitter<Pair<TupleN, Void>> emitter) {
        emitter.emit(Pair.of(input, (Void) null));
      }
View Full Code Here

Examples of org.apache.crunch.types.PTypeFamily.nulls()

  public static <S> PCollection<S> distinct(PCollection<S> input, int flushEvery) {
    Preconditions.checkArgument(flushEvery > 0);
    PType<S> pt = input.getPType();
    PTypeFamily ptf = pt.getFamily();
    return input
        .parallelDo("pre-distinct", new PreDistinctFn<S>(flushEvery), ptf.tableOf(pt, ptf.nulls()))
        .groupByKey()
        .parallelDo("post-distinct", new PostDistinctFn<S>(), pt);
  }
 
  /**
 
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()

    WorkspaceReference[] works = workspaceFields.toArray(new WorkspaceReference[workspaceFields.size()]);
   
    try{
      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(), template.name(), ps, outputField, works, methods, imports);
      case SIMPLE:
        DrillFuncHolder fh = new DrillSimpleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(), template.name(), ps, outputField, works, methods, imports);
        return fh;

      case HOLISTIC_AGGREGATE:
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()

    try{
      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(), template.name(), ps, outputField, works, methods, imports);
      case SIMPLE:
        DrillFuncHolder fh = new DrillSimpleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(), template.name(), ps, outputField, works, methods, imports);
        return fh;

      case HOLISTIC_AGGREGATE:
      case RANGE_AGGREGATE:
      default:
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()


      String[] registeredNames = ((template.name().isEmpty()) ? template.names() : new String[] {template.name()} );
      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SUM_AGGREGATE:
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()

      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SUM_AGGREGATE:
        return new DrillDecimalSumAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case SIMPLE:
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()

          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SUM_AGGREGATE:
        return new DrillDecimalSumAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case SIMPLE:
        if (outputField.isComplexWriter)
          return new DrillComplexWriterFuncHolder(template.scope(), template.nulls(),
              template.isBinaryCommutative(),
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()

      case DECIMAL_SUM_AGGREGATE:
        return new DrillDecimalSumAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case SIMPLE:
        if (outputField.isComplexWriter)
          return new DrillComplexWriterFuncHolder(template.scope(), template.nulls(),
              template.isBinaryCommutative(),
              template.isRandom(), registeredNames,
              ps, outputField, works, methods, imports);
        else
          return new DrillSimpleFuncHolder(template.scope(), template.nulls(),
View Full Code Here

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.nulls()

          return new DrillComplexWriterFuncHolder(template.scope(), template.nulls(),
              template.isBinaryCommutative(),
              template.isRandom(), registeredNames,
              ps, outputField, works, methods, imports);
        else
          return new DrillSimpleFuncHolder(template.scope(), template.nulls(),
                                           template.isBinaryCommutative(),
                                           template.isRandom(), registeredNames,
                                           ps, outputField, works, methods, imports, template.costCategory());
      case SC_BOOLEAN_OPERATOR:
        return new DrillBooleanOPHolder(template.scope(), template.nulls(),
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.