Class FileSystemTableSink

    • Method Detail

      • requiresPartitionGrouping

        public boolean requiresPartitionGrouping​(boolean supportsGrouping)
        Description copied from interface: SupportsPartitioning
        Returns whether data needs to be grouped by partition before it is consumed by the sink. By default, this is not required from the runtime and records arrive in arbitrary partition order.

        If this method returns true, the sink can expect that all records will be grouped by the partition keys before consumed by the sink. In other words: The sink will receive all elements of one partition and then all elements of another partition. Elements of different partitions will not be mixed. For some sinks, this can be used to reduce the number of partition writers and improve writing performance by writing one partition at a time.

        The given argument indicates whether the current execution mode supports grouping or not. For example, depending on the execution mode a sorting operation might not be available during runtime.

        Specified by:
        requiresPartitionGrouping in interface SupportsPartitioning
        Parameters:
        supportsGrouping - whether the current execution mode supports grouping
        Returns:
        whether data need to be grouped by partition before consumed by the sink. If supportsGrouping is false, it should never return true, otherwise the planner will fail.
      • getChangelogMode

        public ChangelogMode getChangelogMode​(ChangelogMode requestedMode)
        Description copied from interface: DynamicTableSink
        Returns the set of changes that the sink accepts during runtime.

        The planner can make suggestions but the sink has the final decision what it requires. If the planner does not support this mode, it will throw an error. For example, the sink can return that it only supports ChangelogMode.insertOnly().

        Specified by:
        getChangelogMode in interface DynamicTableSink
        Parameters:
        requestedMode - expected set of changes by the current plan
      • applyOverwrite

        public void applyOverwrite​(boolean overwrite)
        Description copied from interface: SupportsOverwrite
        Provides whether existing data should be overwritten or not.
        Specified by:
        applyOverwrite in interface SupportsOverwrite
      • applyStaticPartition

        public void applyStaticPartition​(Map<String,​String> partition)
        Description copied from interface: SupportsPartitioning
        Provides the static part of a partition.

        A single partition maps each partition key to a partition value. Depending on the user-defined statement, the partition might not include all partition keys.

        See the documentation of SupportsPartitioning for more information.

        Specified by:
        applyStaticPartition in interface SupportsPartitioning
        Parameters:
        partition - user-defined (possibly partial) static partition