Skip to content

[Bug]: mo-tester sorts rows by ignored columns, causing false BVT failures #27164

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

MatrixOne PR head 34cfec2c408bef6a25e4d2f02bd06e20960727f4; mo-tester b95f5c09930c42bdbe77828b6ae72d39f2be48ed

Other Environment Information

- Hardware parameters: GitHub-hosted x86 runner
- OS type: Ubuntu 22.04
- Others: Matrixone Compose CI, multi-CN BVT with PROXY

Actual Behavior

The PROXY BVT job in MatrixOne PR #27154 falsely fails two logically matching queries in test/distributed/cases/snapshot/sys_restore_system_table_to_sys_account.sql:

ERROR RSRow - [row:0,column:1] one is [test_if_hit_second_elseif],
but the other is [test_if_hit_else]

The SQL marks columns 0,9,10 as ignored. Expected rows use procedure IDs 1920000 and 1920001; actual rows use IDs 9 and 10. All checked (non-ignored) values match.

Root cause is in mo-tester: RSSet.equals sorts rows using RSRow.rowText, and rowText contains ignored columns. Lexical sorting keeps expected IDs in 1920000,1920001 order but sorts actual IDs as 10,9. The subsequent cell comparison skips ignored columns, but by then it compares the two procedure names crosswise.

Evidence:

The same mismatch occurs before and after snapshot restore, while the actual rows contain the expected procedures. This proves the failure is in result matching rather than snapshot restore or PR #27154.

Expected Behavior

Ignored columns must not influence unordered row matching or sort order. These two result sets should compare equal, and the BVT should pass.

Steps to Reproduce

1. Use mo-tester b95f5c09930c42bdbe77828b6ae72d39f2be48ed.
2. Compare a two-row expected result with ignored column 0 values 1920000 and 1920001.
3. Return the same checked values with ignored column 0 values 9 and 10.
4. Observe that RSSet.equals sorts by the full row text, pairs the rows in different orders, and reports a false difference in checked column 1.
5. The concrete CI reproducer is test/distributed/cases/snapshot/sys_restore_system_table_to_sys_account.sql at the two "select * from mo_catalog.mo_stored_procedure" statements around SQL rows 167 and 183.

Additional information

Searches in both matrixorigin/matrixone and matrixorigin/mo-tester found no issue or PR for ignored columns affecting row sorting. MatrixOne #22191 / mo-tester #178 concern a different metadata-column-count crash.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions