SulphurFH opened a new pull request, #29275: URL: https://github.com/apache/flink/pull/29275
## What is the purpose of the change Fix [FLINK-40753](https://issues.apache.org/jira/browse/FLINK-40753): planning failures for correlated subqueries over SQL `VALUES`. This was found while reviewing [#29201](https://github.com/apache/flink/pull/29201#discussion_r4068948306) and is independent of the Python DataFrame API. ## Brief change log - Return an identity frame for `Values` so parent nodes can continue decorrelation. - Handle projections simplified to `Values` without assuming a `LogicalProject` result. - Add batch/streaming plan tests and batch execution tests for `EXISTS` and `NOT EXISTS`. ## Verifying this change - Verified the regression before the fix: 16 of the 18 new cases failed with `unexpected correlate variable $cor0 in the plan`. - Verified the generated plans use native semi/anti joins. - Rebased onto upstream `master` at `9385e25e2da` and rebuilt the Planner dependency reactor with Java 21. - All 897 selected tests passed (0 failures/errors/skips), including the 18 new cases and existing subquery/semi/anti-join suites: ```sh ./mvnw -pl flink-table/flink-table-planner clean verify \ '-Dtest=*SubQuery*Test,SubqueryCorrelateVariablesValidationTest,*SemiAntiJoin*Test,SubQueryValuesITCase' \ -Djdk21 -Pjava21-target ``` The new execution tests cover NULL keys, duplicate rows, empty inputs, projections, filters, and computed keys. `spotless:check` also passed. The full repository test suite was not run. ## Does this pull request potentially affect one of the following parts: - Dependencies: no - The public API: no - The serializers: no - The runtime per-record code paths: no - Deployment or recovery: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no, this is a bug fix. - If yes, how is the feature documented? not applicable. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Codex GPT-5 -- 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]
