Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

By adding targetColumnList information to the DynamicTableSink#Context, this problem can be solved.

Public Interfaces

Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.

A public interface is any change to the following:

  • DataStream and DataSet API, including classes related to that, such as StreamExecutionEnvironment
  • Classes marked with the @Public annotation
  • On-disk binary formats, such as checkpoints/savepoints
  • User-facing scripts/command-line tools, i.e. bin/flink, Yarn scripts, Mesos scripts
  • Configuration settings
  • Exposed monitoring information

Proposed Changes

Add new getTargetColumnList to DynamicTableSink#Context

Code Block
languagejava
        /**
         * Returns the user specified target column name list or an empty list when not specified.
         *
         * <p>This information comes from the column list of the DML clause, e.g.,
         *
         * <ul>
         *   <li>insert: 'insert into target(a, b, c) ...', the column list will be 'a, b, c'. the
         *       column list will be empty for 'insert into target select ...'.
         *   <li>update: 'update target set a=1, b=2 where ...', the column list will be 'a, b'.
         * </ul>
         *
         * <p>Note: the column list will always be empty in the delete clause.
         */
        List<String> getTargetColumnList();


Proposed Changes

The internal SinkRuntimeProviderContext will support new constructor with targetColumnList param, this can be used by connectors to recognize the user-specified column listDescribe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users? 
  • If we are changing behavior how will we phase out the older behavior? 
  • If we need special migration tools, describe them here.
  • When will we remove the existing behavior?

Test Plan

Describe in few sentences how the FLIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?

Rejected Alternatives

...

This is a compatible change, the newly added information has no effect on the behavior of existing connectors, but simply provides additional information to satisfy the connector developers who need it

Test Plan

Related plan test will be added, and also update the test values sink for it cases.

Rejected Alternatives