Skip to content

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

Open
slyunnn wants to merge 2 commits into
mainfrom
fix/result-metadata-column-count-shape
Open

slyunnn wants to merge 2 commits into
mainfrom
fix/result-metadata-column-count-shape

Conversation

@slyunnn

@slyunnn slyunnn commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Legacy header padding follow-up — 2026-10-29

Commit 9b17d3966f06aaa6abe2f5dfc5b9dfd3aa0f6d5d removes a single trailing empty header only for legacy results where every data row proves one fewer column. It retains actual empty columns, mixed/empty-row ambiguity and the new format. Four focused parser tests plus five metadata-shape tests passed; the complete suite passed 85/85 from an isolated checkout using the tracked mo.yml. The first suite attempt in the working checkout failed one URL fixture because its existing local mo.yml points to port 23371; that unrelated local configuration was not changed or committed.

On MatrixOne main b01e952ad1021ef8f188641f3a11a1360c001218, isolated two-CN execution of the unchanged product sequence.sql passed 20/20 after this fix; before it, the old result header's trailing alignment spaces generated an eighth empty column. The full sequence group was then 441/515 passed, 74 failed, 0 abnormal: the remaining 69 + 5 failures are JDBC type/precision metadata differences, not changed expected files and not declared product passes. A normal Maven package first failed in its existing assembly-plugin descriptor configuration; -Dassembly.skipAssembly=true built the runtime jar, and distribution assembly is not claimed verified.

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