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

   Fixes #40308.
   
   Changes proposed in this pull request:
     - Add `visitInsertSelectClause` to `FirebirdDMLStatementVisitor` so 
`INSERT ... SELECT` builds its insert columns and the SELECT subquery (with its 
parameter markers) instead of failing with an NPE on the missing 
`insertValuesClause`.
     - In `FirebirdPrepareStatementCommandExecutor`, describe the parameters of 
`INSERT ... SELECT` from the query, in parameter marker order. `col BETWEEN ? 
AND ?` now gets the column type too. Parameters that can't be matched to a 
column still fall back to VARCHAR, now at their own position instead of after 
the matched ones.
     - Answer `isc_info_sql_stmt_select` for `INSERT ... SELECT ... RETURNING`, 
so the client gets a cursor with all inserted rows, as the Firebird server 
does. `INSERT ... VALUES ... RETURNING` keeps `exec_procedure`.
     - Expand `RETURNING *` of an INSERT over the target table only, not over 
the tables of the query.
     - Parser IT: enable Firebird for the existing 
`insert_select_with_all_columns` and `insert_select_without_columns` cases, and 
add `insert_select_with_returning_firebird`. Add unit tests for the parameter 
description and the `RETURNING *` cursor case.
   
   ---
   
   Before submitting this PR, I confirm that:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] I have reviewed my changes.
   - [ ] I have (or in comment I request) added corresponding labels for the 
pull request.
   - [x] I have passed the required local checks: `./mvnw clean install -B -T1C 
-Pcheck`.
   - [ ] I have updated the relevant documentation, if applicable.
   - [x] I have added or updated unit tests for my changes, if applicable.
   - [ ] I have updated the Release Notes of the current development version, 
if applicable. For more details, see [Update Release 
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/).
   
   AI disclosure: drafted with Claude Code (Claude Opus 5.5); files: 
FirebirdDMLStatementVisitor.java, FirebirdPrepareStatementCommandExecutor.java, 
FirebirdPrepareStatementCommandExecutorTest.java, insert.xml, insert.xml.


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