Skip to content

[5/7] Implement native SEA parameter batching - #1632

Open
sreekanth-db wants to merge 7 commits into
mainfrom
sreekanth-db/stack/native-batch-sea
Open

[5/7] Implement native SEA parameter batching#1632
sreekanth-db wants to merge 7 commits into
mainfrom
sreekanth-db/stack/native-batch-sea

Conversation

@sreekanth-db

@sreekanth-db sreekanth-db commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

🥞 Stacked PR

Use this link to review incremental changes.


Description

Add opt-in native PreparedStatement batch execution through the Statement Execution API.

  • Add the driver-owned StatementParameterSet request model.
  • Serialize ordered parameter sets as parameter_sets with zero-based ordinals.
  • Ensure singular parameters and batch parameter_sets are mutually exclusive.
  • Omit row_limit so update-count results are not truncated.
  • Reuse the existing SEA submission, polling, timeout, cancellation, and result lifecycle.
  • Reuse shared native routing, 42P02 fallback, repeat-count expansion, and result-error handling.

Native batching remains disabled by default through EnableNativeBatching=0.

Testing

  • Full DatabricksSdkClientTest: 49 passed.
  • Targeted SEA request, capability, and fallback tests passed.
  • Live serverless SEA native insertion passed with update-count and table-row verification.
  • Live DBR 18.1 SEA compatibility fallback passed; verified one native attempt followed by three individual legacy executions.
  • Temporary test tables were removed.
  • Isaac review completed; the sole ordinal concern was invalidated by the zero-based backend contract and successful live native execution.

Additional Notes to the Reviewer

The existing singular SEA path retains its current behavior. Zero-based ordinal conversion is applied only while constructing native parameter_sets.

NO_CHANGELOG=true

Keep existing batching behavior behind a dedicated executor so native routing can be added without changing the compatibility fallback.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Introduce a dormant opt-in and deterministic parameter snapshots so both native transports can share the same ordered payload without changing execution behavior.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Snapshot prepared parameter sets at addBatch time and route eligible batches through an injectable native executor while preserving the legacy production path.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Accept the immutable parameter map produced by the shared batch model instead of requiring a concrete HashMap.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Route eligible prepared batches through compute-aware Thrift batchParameters, preserve legacy compatibility fallback, and map repeat-compressed backend results to ordered JDBC update counts.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Surface post-success count-read errors as RESULT_SET_ERROR and clear committed batches before propagating so retries cannot duplicate inserted rows.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Submit ordered parameter_sets through the existing SEA execution lifecycle so opt-in prepared batches share the same routing, fallback, and JDBC result handling as Thrift.

Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
@github-actions

Copy link
Copy Markdown

JDBC integration tests triggered (replay, thrift + sea). View workflow runs.

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@sreekanth-db sreekanth-db changed the title Implement native SEA parameter batching [5/7] Implement native SEA parameter batching Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant