LuciferYang opened a new pull request, #11400: URL: https://github.com/apache/paimon/pull/11400
### Purpose Fixes #11399. On Spark 4.2 and 4.3, a V2-write UPDATE, or a MERGE INTO with an UPDATE or INSERT action, on an append table with a VARCHAR column fails with `Max iterations (100) reached for batch Resolution`, whichever columns it assigns. `Spark42RowLevelCommandRewrite` aligns the assignments and hands the command to Spark's `RewriteUpdateTable` or `RewriteMergeIntoTable`, which rewrite only aligned commands. `AssignmentUtils.aligned` compares each value's type with the VARCHAR type kept in the target attribute's metadata, so the command never counted as aligned, and each iteration wrapped another length check around the VARCHAR values. The rule now drops that metadata from the target relation after aligning, as Spark's `ResolveRowLevelCommandAssignments` does; that rule skips Paimon tables because they accept any schema. The length checks stay in the assigned values. ### Tests The Spark 4.2 module, whose test sources the 4.3 module also compiles, now runs the shared `MergeIntoTableTest` and `UpdateTableTest` suites. Without the fix, "merge into with varchar" fails on Spark 4.2 in both V2 append suites. The new `Spark42VarcharRowLevelOpsTest` checks, on a copy-on-write and on a deletion-vector table, that UPDATE and MERGE are planned as `ReplaceData` or `WriteDelta` whether or not they assign the VARCHAR column, that an insert-only MERGE runs, and that an over-long value is still rejected. -- 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]
