coral-beam-runtime/src/main/java/com/linkedin/beam/excution/BeamArrayFlatten.java
public static Collection<KV<String, GenericRecord>> flatten(KV<String, GenericRecord> inputKV,
      List<String> flattenCols, Schema outputSchema) {
    final List<KV<String, GenericRecord>> results = new ArrayList<>();
    final String key = inputKV.getKey();
    final Collection<GenericRecord> resultRecords = flatten(inputKV.getValue(), flattenCols, outputSchema);
    for (GenericRecord record : resultRecords) {
      results.add(KV.of(key, record));
    }
    return results;
  }
/**
   * Flattens a Beam KV pair of String and Avro record on a given of array columns in the Avro record. These columns
   * must have ARRAY schema type and the input values for those column must be either Java array or Collection.
   *
   * @param inputKV Input Beam KV pair of String and Avro record
   * @param flattenCols Columns to be flattened
   * @param outputSchema Schemas of ouput records
   * @return Collection of output records.
   */
Flattens a Beam KV pair of String and Avro record on a given of array columns in the Avro record. These columns
must have ARRAY schema type and the input values for those column must be either Java array or Collection.

@param inputKV Input Beam KV pair of String and Avro record
@param flattenCols Columns to be flattened
@param outputSchema Schemas of ouput records
@return Collection of output records.
Flattens a Beam KV pair of String and Avro record on a given of array columns in the Avro record . These columns must have ARRAY schema type and the input values for those column must be either Java array or Collection . @param inputKV Input Beam KV pair of String and Avro record @param flattenCols Columns to be flattened @param outputSchema Schemas of ouput records @return Collection of output records .
public static Collection<KV<String, GenericRecord>> flatten(KV<String, GenericRecord> inputKV,
      List<String> flattenCols, Schema outputSchema) {
    final List<KV<String, GenericRecord>> results = new ArrayList<>();
    final String key = inputKV.getKey();
    final Collection<GenericRecord> resultRecords = flatten(inputKV.getValue(), flattenCols, outputSchema);
    for (GenericRecord record : resultRecords) {
      results.add(KV.of(key, record));
    }
    return results;
  }
public static Collection < KV < String , GenericRecord > > flatten ( KV < String , GenericRecord > inputKV , List < String > flattenCols , Schema outputSchema ) { final List < KV < String , GenericRecord > > results = new ArrayList < > ( ) ; final String key = inputKV . getKey ( ) ; final Collection < GenericRecord > resultRecords = flatten ( inputKV . getValue ( ) , flattenCols , outputSchema ) ; for ( GenericRecord record : resultRecords ) { results . add ( KV . of ( key , record ) ) ; } return results ; }
Flattens a Beam KV pair of String and Avro record on a given of array columns in the Avro record.
Flattens a Beam KV pair of String and Avro record on a given of array columns in the Avro record .