snuyanzin commented on PR #29830: URL: https://github.com/apache/flink/pull/29830#issuecomment-6791506246
> Thank you [@snuyanzin](https://github.com/snuyanzin). My AI still found something that needs to be evaluated: > > ``` > The partial-delete path can now evaluate non-key expressions (plausible bug). In generateExpression, each projection column first computes the expressions that any column always evaluates (rootAlwaysEvaluatedRefs). That is safe for a normal projection, where every column runs. But for a DELETE row on the partial-delete path, buildKeyProjections (in CalcCodeGenerator) evaluates only the key columns. Its own comment says non-key expressions must never run on these delete records, whose non-key columns may be missing. Example: key column CASE WHEN c THEN f(x) END and non-key column f(x). Now f(x) runs unconditionally on every DELETE row. Key columns are usually plain input fields, so this is rare. The fix is to compute this set from the roots actually being generated, not the whole project list. A partial-delete test should be added. > ``` I was not able tor repro this, anyway I added a test and extra guard -- 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]
