lincoln-lil opened a new pull request, #20282:
URL: https://github.com/apache/flink/pull/20282

   ## What is the purpose of the change
   In order to minimize the potential exceptions or data errors when many users 
use the update stream to lookup join an external table (essentially due to the 
non-deterministic result based on processing-time to lookup external tables). 
   When update exists in the input stream and the lookup key does not contain 
the primary key of the external table,
   FLINK automatically adds materialization of the update by default, so that 
it will only lookup the external table when the insert or update_after message 
arrives, and when the delete or update_before message arrives, it will directly 
querying the latest version of the locally materialized data and sent it to 
downstream operator.
   
   To do so,we introduce a new option 
'table.exec.lookup-join.upsert-materialize' and resue the `UpsertMaterialize`. 
By default, the materialize operator will be added when an update stream lookup 
an external table without containing its primary keys(includes no primary key 
defined). You can also choose no materialization(NONE) or force 
materialization(FORCE) which will always enable materialization except input is 
insert only.
   
   ## Brief change log
   * add 'table.exec.lookup-join.upsert-materialize' to ExecutionConfigOptions
   * add metadata (unique key & upsert key) inference for lookup join
   * add analyzeUpsertMaterializeStrategy for lookup join node in 
FlinkChangelogModeInferenceProgram
   * update tests ensure upsertMaterialize modes is covered
   
   ## Verifying this change
   LookupJoinTest and LookupJoinJsonPlanTest
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
@Public(Evolving): (no)
     - The serializers: (no )
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (docs)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to