Skip to content

docs/test: document Spark JDBC READ_COMMITTED and TopN ANY NULL - #29953

Merged
XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
Lundomn:fix/29838-spark-read-committed
Oct 12, 2026
Merged

XuPeng-SH merged 6 commits into
matrixorigin:mainfrom
Lundomn:fix/29838-spark-read-committed

Conversation

@Lundomn

@Lundomn Lundomn commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #29838
Related to #29968 (TopN ANY NULL regression coverage)

What this PR does / why we need it:

Spark 3.5.3's JDBC writer defaults to READ_UNCOMMITTED, which MatrixOne rejects before inserting rows. This documents the supported isolationLevel=READ_COMMITTED option for Spark JDBC writes, links the guide from both root READMEs, and adds a runnable compatibility probe. MatrixOne's isolation behavior is unchanged.

The probe checks the default writer's MatrixOne 20105 error and empty target, then writes from two nonempty Spark writer partitions with READ_COMMITTED and verifies readback through a fresh Spark JDBC read and a separate JDBC connection.

The TopN test is a separate upstream CI test-contract addition. It keeps unsupported tuple/interval types as negative cases, retains the ANY Prepare-success cases already on main in #29862, and exercises nonliteral ANY NULL through actual partition TopN execution. TestPartitionTopNNonLiteralAnyNullOrder checks output NULLs, payload/group cardinality, flat and constant NULL batches, Reset reuse, and pool cleanup. This consolidates the TopN coverage from #29975; no production code changes.

Validation

  • Complete pkg/sql/colexec/partition package passed through the repository CGo wrapper on combined head ca733a4b001b364ab467521b182fdb199d2c40ad (2.197s).
  • gofmt and git diff --check passed.
  • Spark-side build and probe evidence is from the unchanged Spark files and production source head 73e54458d1a4cd209f9d8eda7795242935880551: build passed; Spark 3.5.3 / Connector/J 8.0.33 / JDK 17 verified READ_UNCOMMITTED rejection (20105), empty target, successful READ_COMMITTED two-partition write, fresh Spark JDBC read and separate SQL readback, and cleanup. The probe was not rerun after the TopN test-only addition.
  • Focused BVT test/distributed/cases/set/set_transaction.sql passed 30/30 on base 035a5b61ba84ffc7dd2193135a7b170af04a4bff. An attempt on source head 73e54458d1a4cd209f9d8eda7795242935880551 failed during mo-tester's pre-test database cleanup after connection retries, before any case ran; no BVT result is claimed for combined head ca733a4b001b364ab467521b182fdb199d2c40ad.
  • At the post-push snapshot, CI preflight, PR size, coverage eligibility, and Mergify Summary passed. UT Test on Ubuntu/x86, SCA on Linux/arm64, shared build, and UT Coverage on Ubuntu/x86 were pending; other listed jobs were skipped. Full remote CI has not passed.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify mergify Bot added kind/documentation Improvements or additions to documentation kind/test-ci labels Oct 12, 2026
@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Oct 12, 2026
@Lundomn Lundomn changed the title docs: document Spark JDBC READ_COMMITTED compatibility docs/test: document Spark JDBC READ_COMMITTED and TopN ANY NULL Oct 12, 2026
@XuPeng-SH

XuPeng-SH commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: ca733a4b001b364ab467521b182fdb199d2c40ad

Assessment: approve

Reviewed the complete six-file delta and relevant isolation, comparison, and operator lifecycle owners. The Spark guidance and compatibility probe match existing behavior; TopN tests preserve rejection coverage and exercise ANY NULL execution, Reset reuse, and cleanup. No actionable defects remain. Production code is unchanged.

Model: gpt-6-astra / xhigh

Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0

Validation:

  • Verified frozen head/base, clean checkout, and patch identity. Python syntax, Go formatting, local link targets, and git diff --check passed.

  • Reused the reported complete partition-package pass on the exact head and successful frozen CI results for build, UT, SCA, coverage, and applicable BVT jobs.

  • Reused the reported Spark 3.5.3/Connector/J 8.0.33/JDK 17 probe on 73e5445: default rejection, empty target, two-partition READ_COMMITTED write, independent readback, and cleanup. Only TopN tests differ from that revision.

  • Reconciled both attempts and all supplied comments; no substantive reviewer concerns were present. Detailed evidence is recorded in attempt-2/review-evidence.json.

Limitations:

  • No local native or Spark rerun; runtime results are attributed to supplied author and CI evidence.

  • The focused transaction BVT attempt failed before executing cases and is not counted as a PR-head pass.

  • Standalone linked-issue bodies were not supplied. Compatibility evidence covers the pinned environment, not a version matrix or distributed retry/atomicity guarantees.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mo-bot review · mo-bot-local · review

Commit: ca733a4b001b364ab467521b182fdb199d2c40ad

Assessment: approve

Reviewed the complete six-file delta and relevant isolation, comparison, and operator lifecycle owners. The Spark guidance and compatibility probe match existing behavior; TopN tests preserve rejection coverage and exercise ANY NULL execution, Reset reuse, and cleanup. No actionable defects remain. Production code is unchanged.

Model: gpt-6-astra / xhigh

Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0

Validation:

  • Verified frozen head/base, clean checkout, and patch identity. Python syntax, Go formatting, local link targets, and git diff --check passed.

  • Reused the reported complete partition-package pass on the exact head and successful frozen CI results for build, UT, SCA, coverage, and applicable BVT jobs.

  • Reused the reported Spark 3.5.3/Connector/J 8.0.33/JDK 17 probe on 73e5445: default rejection, empty target, two-partition READ_COMMITTED write, independent readback, and cleanup. Only TopN tests differ from that revision.

  • Reconciled both attempts and all supplied comments; no substantive reviewer concerns were present. Detailed evidence is recorded in attempt-2/review-evidence.json.

Limitations:

  • No local native or Spark rerun; runtime results are attributed to supplied author and CI evidence.

  • The focused transaction BVT attempt failed before executing cases and is not counted as a PR-head pass.

  • Standalone linked-issue bodies were not supplied. Compatibility evidence covers the pinned environment, not a version matrix or distributed retry/atomicity guarantees.

@mergify mergify Bot added the queued label Oct 12, 2026
@mergify

mergify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-12 10:16 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-10-12 10:17 UTC · at 8cf88dbe5d24d94217d381aec17995c7e179a3b6

This pull request spent 1 minute 9 seconds in the queue, with no time running CI.

Reason

Pull request #29953 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

@XuPeng-SH
XuPeng-SH merged commit d865e54 into matrixorigin:main Oct 12, 2026
17 of 19 checks passed
@mergify mergify Bot added dequeued and removed queued labels Oct 12, 2026

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Improvements or additions to documentation kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compatibility]: Spark JDBC default READ_UNCOMMITTED write fails; document and test READ_COMMITTED integration

3 participants