wuhainan commented on issue #13157:
URL: https://github.com/apache/seatunnel/issues/13157#issuecomment-7163310026

   > > 你好[@wuhainan](https://github.com/wuhainan) 
[@DanielLeens](https://github.com/DanielLeens)# 
[11960](https://github.com/apache/seatunnel/pull/11960)已合并到 dev 
中,因此其检查点数据平面协议现在是此问题的基准。
   > > 合并后的Flink协议建立了以下不变性:
   > > 
   > > * 
对于每个表,模式变更及其依赖的数据记录都遵循相同的键控有序路径。使用旧模式的记录必须在模式变更应用之前被清空,而使用新模式的记录必须始终受到该模式控制序列的约束。
   > > * 每个表只有一个接收器门拥有物理 DDL。紧凑模式控制被广播到接收器写入器,并在恢复后按顺序重放。
   > > * 待处理的 DDL、缓冲记录、已应用的控制序列和最新的目标模式都作为检查点协议状态进行维护。
   > > 
   > > 需要明确一个协议边界:启用 Flink 模式演化时,`incremental.parallelism` 必须保持为 1。大于 1 
的值会在作业启动时被拒绝。同时,设计还需兼顾单表写入和跨多表并行处理。
   > > 这是协议的正确性不变性,而非临时的实现限制。Sink 
写入器仍然可以并行运行,但多个增量读取器不得独立生成模式控制。因此,此问题所要求的“并行执行”验证必须在此限制范围内进行。
   > > 针对此问题的转换端实现不得:
   > > 
   > > * 放宽或绕过 incremental.parallelism = 1 的验证;
   > > * 引入另一个模式协调器或独立的控制路径;
   > > * 允许并行读取器独立发出模式控制;
   > > * 绕过每个表的接收器 DDL 所有者;或者
   > > * 更改现有的排序、依赖门控、检查点或重放语义。
   > > 
   > > 剩余的功能范围应该使 SQL Transform 成为一个能够保留协议的模式更改使用者:
   > > 
   > > 1. 按照既定顺序执行每个模式变更。
   > > 2. 更新转换的运行时输入模式并重新计算其投影。
   > > 3. 在执行任何依赖的转换记录之前,先发出生成的输出模式更改。
   > > 4. 避免传播 SQL 投影排除的上游列。
   > > 5. 当无法安全地转换模式变更时,应明确地报错。
   > > 6. 在检查点和保存点之间保留现有的控制序列和恢复语义。
   > > 
   > > [#12284](https://github.com/apache/seatunnel/pull/12284)中的 SQL 
转换行为可以用作语义参考,但 Flink 
实现必须与[#11960](https://github.com/apache/seatunnel/pull/11960)中的协议集成,而不是导入或创建单独的协调机制。
   > > 如果转换实现过程中确实需要更改任何协议不变式,则应首先将其作为单独的设计讨论来处理,而不应在此问题或其后续 PR 中作为变通方案引入。
   > 
   > [@wuhainan](https://github.com/wuhainan) If you don't plan on implementing 
this feature, I can do it.
   
   Thanks for clarifying the protocol and offering to take this on, @CloverDew 
. Please go ahead and lead the SQL Transform work in #13157 based on #11960.
   
   I’d also like to clarify my use case. The pipeline is MySQL CDC → UDF 
Transform → JDBC/TiDB, with no SQL Transform. The UDF plugin only masks the 
phone field and passes all other fields through unchanged. When a nullable 
column is added in MySQL, I’d like SeaTunnel to automatically add the 
corresponding column in TiDB before writing rows that contain it. The new value 
should land correctly, and phone should still be masked, including in the first 
affected row after checkpoint or savepoint restore.
   
   Since #13157 focuses on SQL Transform, would you recommend tracking 
standalone UDF Transform support in a separate issue linked to this one? I’m 
happy to share a minimal test job with synthetic data.


-- 
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