thswlsqls opened a new pull request, #40070:
URL: https://github.com/apache/shardingsphere/pull/40070

   Fixes #40066.
   
   Changes proposed in this pull request:
     - Copy the `returning` segment into the bound statement in 
`UpdateStatementBinder` and `DeleteStatementBinder`, as `InsertStatementBinder` 
already does.
     - Without it, `FirebirdPrepareStatementCommandExecutor` sees no RETURNING 
on the bound statement, so `UPDATE/DELETE ... RETURNING` is classified as plain 
UPDATE/DELETE instead of `EXEC_PROCEDURE` and its columns are not described.
     - Extend `UpdateStatementBinderTest#assertBind` and 
`DeleteStatementBinderTest#assertBind` to assert the RETURNING segment survives 
binding.
     - Other UPDATE fields (`output`, `withTableHint`, `optionHint`) are also 
not copied, but nothing reads them after binding, so they are left out of this 
fix.
   
   AI assistance: Claude Code was used to draft the change and its unit tests 
in `infra/binder/core` (`UpdateStatementBinder`, `DeleteStatementBinder` and 
their tests) and the `RELEASE-NOTES.md` entry. I reviewed, verified, and take 
responsibility for every line submitted.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following 
options:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the 
pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`. Not run for the full repository; 
ran repository-wide `spotless:check`, `checkstyle:check` and `apache-rat:check` 
with `-Pcheck`, plus `./mvnw install -pl infra/binder/core -am -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`, all passing. Firebird E2E was not 
run.
   - [ ] I have made corresponding changes to the documentation. No user 
documentation describes this behavior.
   - [x] I have added corresponding unit tests for my changes.
   - [x] I have updated the Release Notes of the current development version. 
For more details, see [Update Release 
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   - [x] I have disclosed the tool and affected files or scope for any material 
AI assistance, as required by the [AI-assisted contribution policy].
   
   [AI-assisted contribution policy]: 
https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
   
   
   


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