Class ArrayFromTuple

  • All Implemented Interfaces:
    Serializable, Extractor<org.apache.flink.api.java.tuple.Tuple,​Object[]>

    @Internal
    public class ArrayFromTuple
    extends Object
    implements Extractor<org.apache.flink.api.java.tuple.Tuple,​Object[]>
    Converts a Tuple to an Object-Array. The field which should be included in the array can selected and reordered as needed.
    See Also:
    Serialized Form
    • Constructor Detail

      • ArrayFromTuple

        public ArrayFromTuple()
        Using this constructor the extractor will convert the whole tuple (all fields in the original order) to an array.
      • ArrayFromTuple

        public ArrayFromTuple​(int... indexes)
        Using this constructor the extractor will combine the fields as specified in the indexes parameter in an object array.
        Parameters:
        indexes - the field ids (enumerated from 0)
    • Method Detail

      • extract

        public Object[] extract​(org.apache.flink.api.java.tuple.Tuple in)
        Description copied from interface: Extractor
        Extracts/Converts the given input to an object of the output type.
        Specified by:
        extract in interface Extractor<org.apache.flink.api.java.tuple.Tuple,​Object[]>
        Parameters:
        in - the input data
        Returns:
        the extracted/converted data