(combined == null) ? byFields.aggregateFieldsById(inputs, combineFn, fieldAggregation.outputField) : combined.aggregateFieldsById(inputs, combineFn, fieldAggregation.outputField); } else { (combined == null) ? byFields.aggregateField(inputs.get(0), combineFn, fieldAggregation.outputField) : combined.aggregateField(inputs.get(0), combineFn, fieldAggregation.outputField);
Group.<OuterAggregate>byFieldAccessDescriptor(field2Selector) .aggregateFields(field1Selector, Sum.ofLongs(), "field1_sum") .aggregateFields(field3Selector, Sum.ofIntegers(), "field3_sum") .aggregateFields(field1Selector, Top.largestLongsFn(1), "field1_top"));
Group.<AggregatePojos>byFieldNames("field2") .aggregateField("field1", Sum.ofLongs(), "field1_sum") .aggregateField("field3", Sum.ofIntegers(), "field3_sum") .aggregateField("field1", Top.largestLongsFn(1), "field1_top"));
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over single field of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. * * <p>Field types in the output schema will be inferred from the provided combine function. * Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the * overload that allows setting the output field type explicitly. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( String inputFieldName, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return new CombineFieldsByFields<>( this, SchemaAggregateFn.<InputT>create() .aggregateFields( FieldAccessDescriptor.withFieldNames(inputFieldName), fn, outputFieldName)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over single field of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. * * <p>Field types in the output schema will be inferred from the provided combine function. * Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the * overload that allows setting the output field type explicitly. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( String inputFieldName, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return new CombineFieldsByFields<>( byFields, schemaAggregateFn.aggregateFields( FieldAccessDescriptor.withFieldNames(inputFieldName), fn, outputFieldName)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over multiple fields of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. * * <p>Field types in the output schema will be inferred from the provided combine function. * Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the * overload that allows setting the output field type explicitly. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFields( FieldAccessDescriptor fieldsToAggregate, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return new CombineFieldsByFields<>( this, SchemaAggregateFn.<InputT>create() .aggregateFields(fieldsToAggregate, fn, outputFieldName)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over multiple fields of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. * * <p>Field types in the output schema will be inferred from the provided combine function. * Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the * overload that allows setting the output field type explicitly. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFields( List<String> inputFieldNames, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return aggregateFields( FieldAccessDescriptor.withFieldNames(inputFieldNames), fn, outputFieldName); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over multiple fields of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. * * <p>Field types in the output schema will be inferred from the provided combine function. * Sometimes the field type cannot be inferred due to Java's type erasure. In that case, use the * overload that allows setting the output field type explicitly. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFields( FieldAccessDescriptor fieldsToAggregate, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return new CombineFieldsByFields<>( byFields, schemaAggregateFn.aggregateFields(fieldsToAggregate, fn, outputFieldName)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over single field of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( String inputFieldName, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return new CombineFieldsByFields<>( byFields, schemaAggregateFn.aggregateFields( FieldAccessDescriptor.withFieldNames(inputFieldName), fn, outputField)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over single field of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( String inputFieldName, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return new CombineFieldsByFields<>( this, SchemaAggregateFn.<InputT>create() .aggregateFields( FieldAccessDescriptor.withFieldNames(inputFieldName), fn, outputField)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over multiple fields of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFields( FieldAccessDescriptor fieldsToAggregate, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return new CombineFieldsByFields<>( this, SchemaAggregateFn.<InputT>create().aggregateFields(fieldsToAggregate, fn, outputField)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over multiple fields of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFields( FieldAccessDescriptor fieldsToAggregate, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return new CombineFieldsByFields<>( byFields, schemaAggregateFn.aggregateFields(fieldsToAggregate, fn, outputField)); }
/** * Build up an aggregation function over the input elements. * * <p>This method specifies an aggregation over multiple fields of the input. The union of all * calls to aggregateField and aggregateFields will determine the output schema. */ public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFields( List<String> inputFieldNames, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return aggregateFields( FieldAccessDescriptor.withFieldNames(inputFieldNames), fn, outputField); }
public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( int inputFieldId, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return new CombineFieldsByFields<>( this, SchemaAggregateFn.<InputT>create() .aggregateFields( FieldAccessDescriptor.withFieldIds(inputFieldId), fn, outputFieldName)); }
public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( int inputFieldId, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return new CombineFieldsByFields<>( byFields, schemaAggregateFn.aggregateFields( FieldAccessDescriptor.withFieldIds(inputFieldId), fn, outputField)); }
public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( int inputFieldId, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return new CombineFieldsByFields<>( this, SchemaAggregateFn.<InputT>create() .aggregateFields(FieldAccessDescriptor.withFieldIds(inputFieldId), fn, outputField)); }
public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateFieldsById( List<Integer> inputFieldIds, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, Field outputField) { return aggregateFields(FieldAccessDescriptor.withFieldIds(inputFieldIds), fn, outputField); }
public <CombineInputT, AccumT, CombineOutputT> CombineFieldsByFields<InputT> aggregateField( int inputFieldId, CombineFn<CombineInputT, AccumT, CombineOutputT> fn, String outputFieldName) { return new CombineFieldsByFields<>( byFields, schemaAggregateFn.aggregateFields( FieldAccessDescriptor.withFieldIds(inputFieldId), fn, outputFieldName)); }