FlyingZC commented on PR #38793:
URL: https://github.com/apache/shardingsphere/pull/38793#issuecomment-4618456891
### Review Result
No blocking issues found.
- **Merge Verdict: Mergeable**
- **Reviewed Scope:** PR #38793 latest head
`d106aae2aca7b0d0f5f0b9b5fcbf622d51901cd7`, merge-base
`59ac3754fb09af71faa128ec0d5c26137945ce91`.
- **Changed Files:**
`jdbc/src/main/java/org/apache/shardingsphere/driver/jdbc/adapter/AbstractPreparedStatementAdapter.java`
- **Not Reviewed Scope:** Full repository build and E2E suites were not
run.
- **Need Expert Review:** No.
### Basis
This is a scoped JDBC refactor. The previous implementation rebuilt a
`PreparedStatementInvocationReplayer` list for every replay, then immediately
iterated it to call
`PreparedStatement#setObject(index, value)`. The new implementation
directly iterates parameters and calls `preparedStatement.setObject(++index,
each)`.
Behavior is preserved:
- Parameter order is unchanged.
- JDBC parameter indexes remain 1-based.
- The final JDBC setter call is still `PreparedStatement#setObject`.
- Batch replay still uses the existing `parameterSets` flow.
- No public API, SPI, parser, route, config, Proxy, or dialect-specific
behavior is changed.
The performance direction is positive: it removes per-replay
lambda/list-node allocations and one intermediate traversal. Complexity remains
`O(parameter count)`, but the hot path is
simpler and allocates less.
### Verification
- GitHub `/pulls/38793/files` matched local triple-dot diff: exactly one
modified file.
- Local PR-head verification:
- `./mvnw -pl jdbc -am -DskipITs -Dspotless.skip=true
-Dtest=PreparedStatementAdapterTest -Dsurefire.failIfNoSpecifiedTests=false
test` -> exit 0, `Tests run: 24, Failures: 0, Errors:
0, Skipped: 0`
- `./mvnw -pl jdbc -am checkstyle:check -Pcheck -T1C` -> exit 0
- `./mvnw -pl jdbc -am spotless:check -Pcheck -T1C` -> exit 0
--
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]