Class RowPartitionComputer

    • Field Detail

      • defaultPartValue

        protected final String defaultPartValue
      • partitionColumns

        protected final String[] partitionColumns
      • partitionIndexes

        protected final int[] partitionIndexes
    • Constructor Detail

      • RowPartitionComputer

        public RowPartitionComputer​(String defaultPartValue,
                                    String[] columnNames,
                                    String[] partitionColumns)
    • Method Detail

      • projectColumnsToWrite

        public org.apache.flink.types.Row projectColumnsToWrite​(org.apache.flink.types.Row in)
        Description copied from interface: PartitionComputer
        Project non-partition columns for output writer.
        Specified by:
        projectColumnsToWrite in interface PartitionComputer<org.apache.flink.types.Row>
        Parameters:
        in - input record.
        Returns:
        projected record.
      • restorePartValueFromType

        public static Object restorePartValueFromType​(String valStr,
                                                      org.apache.flink.table.types.DataType type)
      • restorePartValueFromType

        public static Object restorePartValueFromType​(String valStr,
                                                      org.apache.flink.table.types.logical.LogicalType type)
        Restore partition value from string and type. This method is the opposite of method generatePartValues(org.apache.flink.types.Row).
        Parameters:
        valStr - string partition value.
        type - type of partition field.
        Returns:
        partition value.