Repository navigation
Conversation
TriageCategory: Summary What this impacts
Concerns
Required reviewer action
|
|
Docs drift check: this PR looks like it needs doc updates.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 246ecec. Configure here.
| } catch (IOException e) { | ||
| throw new SQLException("Error buffering batch row", ExceptionUtils.SQL_STATE_SQL_ERROR, e); | ||
| } | ||
| } |
There was a problem hiding this comment.
Failed addBatch leaves partial SQL
Medium Severity
addBatch() writes the separator and the row straight into the shared batchBuffer before the row finishes. If writeCurrentRow() throws, that partial SQL stays buffered while batchRowCount is left unchanged, so the next addBatch() appends another row onto the incomplete text.
Reviewed by Cursor Bugbot for commit 246ecec. Configure here.
AI review gate — Cursor Bugbot found issues
Unresolved findings (1): What to do:
Re-run the gate with “Re-run jobs” after an approval or a finished review. A push re-runs it automatically. |
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|


Summary
PR optimizes the way we use in JDBC to send SQL when RowBinary cannot be used (function used in the expression or another expression that should be done on server). This change creates a new implementation class that substitutes old one by default but user can opt out by setting the configuration flag
Closes #3523
Checklist
Delete items not relevant to your PR:
Note
Medium Risk
The default prepared-statement implementation for common INSERT VALUES paths changes, so serialization and escape/placeholder handling must match the legacy path; failures would affect data writes rather than read-only queries.
Overview
Adds
Client#queryStreamso the SQL request body can be written through aDataStreamWriteron the HTTP output stream instead of building one in-memoryString. Existingquery(...)behavior is unchanged; both paths share a refactoredqueryInternalthat accepts a request factory and can invokeonRetry()on the stream writer before a retry.jdbc-v2 introduces
StreamingPreparedStatementImplas the default for single-groupINSERT ... VALUES (...)where every?sits inside the values list (including SQL functions/expressions in the template). It stores primitives without boxing, serializes literals withSqlByteSink/SqlValueSerializer, batches into chunked UTF-8 buffers, and executes viaqueryStream. Opt out withjdbc_streaming_prepared_statement=falseto keepPreparedStatementImplstring building. JDBC escape rewriting now updates placeholder indices when escapes appear in the SQL template.Docs, integration tests, and JDBC insert benchmarks (streaming vs legacy, with/without compression,
identity(?)cases) are updated accordingly.Reviewed by Cursor Bugbot for commit 246ecec. Bugbot is set up for automated code reviews on this repo. Configure here.