Versions Compared

Key

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

...

Code Block
languagejava
        /**
         * Returns an array of column index paths related to user specified target column list or an
         * empty array when not specified. The indices
 are 0-based and support composite columns
   * are 0-based and support composite columns* within (possibly nested) structures.          
         *
         * <p>This information comes from the column list of the DML clause, e.g., for a sink table
         * t1 which schema is: {@code a STRING, b ROW < b1 INT, 
		 * b2 STRINGSTRING>, b3 ROW <b31 INT, b32 STRING > >, c BIGINT}
         *
         * <ul>
         *   <li>insert: 'insert into targett1(a, b.b1, b.b3.b31b2) ...', the column list will be 'a, b, c.b2', and will
         *       return {@code [[0], [1, 0], [1, 2, 0]]}. The
 column list will be empty for 'insert into *target
       column list will* be empty for 'insert into target select ...'.
         *   <li>update: 'update target set a=1, b.b1=2 where ...', the column list will be 'a,
         *       b.b1', will return {@code [[0], [1, 0]]}.
         * </ul>
         *
         * <p>Note: will always return empty array for athe delete clausestatement because it has no column
         * list.
         */
        int[][] getTargetColumns();

...

The internal SinkRuntimeProviderContext will support new constructor with targetColumnList targetColumns param, this can be used by connectors to recognize the user-specified column list.

...