mxm opened a new pull request, #13277:
URL: https://github.com/apache/iceberg/pull/13277

   This change adds the following components for the Flink Dynamic Iceberg Sink:
   
   ### HashKeyGenerator
   
   A hash key generator which will be used in DynamicIcebergSink class (next 
PR) to implement one of Iceberg's DistributionModes (NONE, HASH, RANGE).
   
   The HashKeyGenerator is responsible for creating the appropriate hash key 
for Flink's keyBy operation. The hash key is generated depending on the 
user-provided DynamicRecord and the table metadata. Under the hood, we maintain 
a set of Flink KeySelectors which implement the appropriate Iceberg 
DistributionMode. For every table, we randomly select a consistent subset of 
writer subtasks which receive data via their associated keys, depending on the 
chosen DistributionMode.
   
   Caching ensures that a new key selector is also created when the table 
metadata (e.g. schema, spec) or the user-provided metadata changes (e.g. 
distribution mode, write parallelism).
   
   ### RowDataEvolver
   
   RowDataEvolver is responsible to change the input RowData to make it 
compatible with the target schema. This is done when:
   
   1. The input schema has fewer fields than the target schema.
   2. The table types are wider than the input type.
   3. The field order differs for source and target schema.
   
   The resolution is as follows:
   
   In the first case, we would add a null values for the missing field (if the 
field is optional). In the second case, we would convert the data for the input 
field to a wider type, e.g. int (input type) => long (table type). In the third 
case, we would rearrange the input data to match the target table.
   
   ### DynamicUpdateOperator
   
   A dedicated operator to updating the schema / spec for the table associated 
with a DynamicRecord.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to