Skip to content

fix: reject result metadata column-count mismatches safely - #207

Open
slyunnn wants to merge 1 commit into
mainfrom
fix/result-metadata-column-count-shape
Open

slyunnn wants to merge 1 commit into
mainfrom
fix/result-metadata-column-count-shape

Conversation

@slyunnn

@slyunnn slyunnn commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Fix

Reject different result-set column counts before indexing column arrays. Previously, a larger expected shape threw ArrayIndexOutOfBoundsException, while a smaller expected shape could silently accept extra actual columns. Existing same-shape label/full-metadata policies are unchanged.

Five focused tests cover both mismatch directions, empty/nonempty shapes, equal-shape controls and existing metadata-policy behavior. Only the comparator and its unit test are changed; no product BVT expected result, connection config, log or artifact is committed.

Direct validation (local, not inferred from CI)

  • Original implementation: focused five tests yielded 2 failures and 1 exception, reproducing both defects.
  • Fixed implementation: focused 5/5 passed; full mo-tester unit suite 81/81 passed with repository-default mo.yml.
  • The first full-unit attempt had one fixture mismatch because this task uses port23371 while an existing test expects6001. Temporarily using the unchanged repository default resolved it; local config was restored and is not committed.
  • Runtime jar built with mvn -o -DskipTests -Dassembly.skipAssembly=true package, after the separate full test pass. The default assembly plugin version rejected the old singular descriptor configuration despite assembly.xml existing; distribution assembly was skipped, not fixed in this PR.
  • MatrixOne main e5dd4724f782067e1c76c38c9d2f55cebceda4a9, runtime git_version()=e5dd4724f7.
  • Complete sequence BVT now finishes and emits a report: 461 statements,387 pass,74 fail,0 abnormal. No array-bounds crash. Failures remain visible:69 create_sequence metadata differences,4 seq_func2 metadata differences,and1 legacy expected header with an extra empty column. This is explicitly not a sequence pass; no baselines were altered.
  • AUTO_INCREMENT BVT with the rebuilt tester: 896/896 passed.

Evidence excerpts:

Tests run:81, Failures:0, Errors:0, Skipped:0
The column count does not equal with each other, one is8, the other is7
TOTAL:461, SUCCESS:387, FAILED:74, IGNORED:0, ABNORAML:0
TOTAL:896, SUCCESS:896, FAILED:0, IGNORED:0, ABNORAML:0

Raw logs, exact sources and hashes are retained in the originating task's outputs/attempt-14 (not uploaded by this PR). Found while executing Feature #23371's AINC-060; this tester fix does not claim the feature caused the pre-existing comparator defect or baseline differences.

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant