Class ReorderColumnsTransform

    • Constructor Detail

      • ReorderColumnsTransform

        public ReorderColumnsTransform​(String... newOrder)
        Parameters:
        newOrder - A partial or complete order of the columns in the output
      • ReorderColumnsTransform

        public ReorderColumnsTransform​(List<String> newOrder)
        Parameters:
        newOrder - A partial or complete order of the columns in the output
    • Method Detail

      • setInputSchema

        public void setInputSchema​(Schema inputSchema)
        Description copied from interface: ColumnOp
        Set the input schema.
        Specified by:
        setInputSchema in interface ColumnOp
      • getInputSchema

        public Schema getInputSchema()
        Description copied from interface: ColumnOp
        Getter for input schema
        Specified by:
        getInputSchema in interface ColumnOp
        Returns:
      • map

        public List<Writable> map​(List<Writable> writables)
        Description copied from interface: Transform
        Transform a writable in to another writable
        Specified by:
        map in interface Transform
        Parameters:
        writables - the record to transform
        Returns:
        the transformed writable
      • map

        public Object map​(Object input)
        Transform an object in to another object
        Specified by:
        map in interface Transform
        Parameters:
        input - the record to transform
        Returns:
        the transformed writable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • outputColumnName

        public String outputColumnName()
        The output column name after the operation has been applied
        Specified by:
        outputColumnName in interface ColumnOp
        Returns:
        the output column name
      • outputColumnNames

        public String[] outputColumnNames()
        The output column names This will often be the same as the input
        Specified by:
        outputColumnNames in interface ColumnOp
        Returns:
        the output column names
      • columnNames

        public String[] columnNames()
        Returns column names this op is meant to run on
        Specified by:
        columnNames in interface ColumnOp
        Returns:
      • columnName

        public String columnName()
        Returns a singular column name this op is meant to run on
        Specified by:
        columnName in interface ColumnOp
        Returns: