Skip to content

[Bug]: TopN unsupported-order-type UT still rejects T_any after NULL comparator support #29968

Closed

Description

@iamlinjunhong

Actual behavior

TestPartitionTopNRejectsUnsupportedOrderType deterministically fails at pkg/sql/colexec/partition/topn_test.go:140: the test expects ErrNotSupported, but Partition.Prepare returns nil for its T_any order key.

This blocks the Coverage UT producer. The downstream coverage merge also fails because the producer did not publish a complete profile; no coverage verdict is calculated.

CI occurrence

Stable failure excerpt from the complete producer job log:

=== RUN   TestPartitionTopNRejectsUnsupportedOrderType
    topn_test.go:140:
        Error:      Should be true
        Test:       TestPartitionTopNRejectsUnsupportedOrderType
        Messages:   <nil>
--- FAIL: TestPartitionTopNRejectsUnsupportedOrderType (0.00s)
FAIL github.com/matrixorigin/matrixone/pkg/sql/colexec/partition

Downstream signature:

coverage merge blocked: a required producer did not publish a complete coverage profile; no coverage verdict was calculated

Clean official-main comparison and reproduction

Fetched official matrixorigin/matrixone main and created a separate, clean, detached validation worktree at 5a5501b3e1048f3d19d96824cc68a62b7f0fcb07. git status --porcelain=v2 --untracked-files=all was empty before and after testing. Ran the identical focused command on this baseline and the exact PR head:

.agents/skills/mo-dev/scripts/mo-cgo-test   -short -v -count=1 -tags matrixone_test -timeout=120s   -run '^TestPartitionTopNRejectsUnsupportedOrderType$'   ./pkg/sql/colexec/partition

Both exit 1 with the same test, line 140, failed assertion, and <nil> message. Local platform: Darwin/arm64, Go 1.27.1, CGo enabled; the baseline wrapper verified and reused platform-matched native artifacts from the primary lane. This is a focused local reproduction, without full-repository coverage instrumentation; the independent Linux/x64 CI occurrence and the deterministic comparator branch explain the same signature across modes.

Cause and independence from the source PR

Official-main change #29918 adds T_any support to the comparator factory at pkg/compare/compare.go:192, with TestDomainlessNullCompare covering the domainless NULL contract. The existing TopN rejection test still selects T_any as its supposedly unsupported type.

The exact path is Partition.Prepare -> prepareTopN -> compare.NewOrder -> newCompareFor(T_any) -> strCompare. prepareTopN returns ErrNotSupported only when comparator creation returns nil. It now obtains a comparator and returns nil. Non-NULL ANY values remain rejected during Compare/Copy; this report does not request removing the domainless NULL support.

git diff up/main <exact PR head> -- pkg/compare pkg/sql/colexec/partition is empty. The complete PR diff changes only Decimal256 dropped-tail parsing, types/external regression tests, and a LOAD BVT case/result. parse256 is not on this failing Prepare path, which fails before row parsing or sorting. The clean-main same-signature failure establishes this is an upstream test-contract mismatch, rather than a Decimal256 PR regression or a timing flake.

Exact PR-head validation also passes:

.agents/skills/mo-dev/scripts/mo-cgo-test   -short -v -count=1 -tags matrixone_test -timeout=120s   ./pkg/container/types ./pkg/sql/colexec/external

Exit 0; types 0.562s, external 36.172s. No source changes were made during diagnosis.

Expected behavior and follow-up

Keep domainless NULL comparison supported. Update the unsupported-order-type regression to exercise an actually unsupported type while retaining its error and cleanup oracles, and retain the ANY NULL positive coverage. The partition package and Coverage UT should agree with the comparator contract.

Searched open and closed reports by the exact test name, TopNRejects, T_any with TopN, and domainless partition signatures before filing; no matching report was found.

After the original workflow completes, the authorized repair lane will request one failed-jobs rerun for run 38199353350 and verify acceptance. A rerun is not evidence that this deterministic defect has been fixed; unrelated partition code is kept out of the Decimal256 PR.

Activity

  1. self-assigned this
    on Oct 12, 2026
  2. iamlinjunhong commented on Oct 12, 2026

    @iamlinjunhong
    ContributorAuthor

    PR 29969 occurrence and current-main comparison

    This CI occurrence was inspected for PR #29969 at exact head 3c21381bd3a6f01c3c56a0569eaa596f69e6f2a2.

    A clean, detached official-main comparison was run at freshly fetched up/main = 02a2823c2007d5e4fb4ada148e93743df337551a, inside the current Loom lane. The same focused command was run on this base and the PR head:

    .agents/skills/mo-dev/scripts/mo-cgo-test \
      -short -v -count=1 -tags matrixone_test -timeout=120s -p 8 \
      -covermode=set -coverprofile=<TMPDIR/profile> \
      -coverpkg=./pkg/sql/colexec/partition,./pkg/sql/compile \
      -run '^(TestPartitionTopNRejectsUnsupportedOrderType|TestTruncateLifecycleRCWaitPolicy)$' \
      ./pkg/sql/colexec/partition ./pkg/sql/compile

    Both commands terminate with exit 1 and the same normalized failure signatures. Local platform is Darwin/arm64, Go 1.27.1, CGo enabled; this focused comparison uses the same short/tag/coverage mode but narrows package coverage and timeout, and is not a claim of a full Linux CI reproduction. Main is clean before and after; the wrapper verifies platform-matched native provenance and reuses only this lane's native artifacts.

    === RUN TestPartitionTopNRejectsUnsupportedOrderType
      topn_test.go:140: Should be true
      Messages: <nil>
    --- FAIL: TestPartitionTopNRejectsUnsupportedOrderType (0.00s)
    

    The causal path remains Partition.Prepare -> prepareTopN -> compare.NewOrder -> newCompareFor(T_any). Current main returns a non-nil strCompare for ANY/NULL support, while this test still expects ErrNotSupported. The failure occurs during Prepare, before input rows or TIME conversions. git diff up/main HEAD -- pkg/compare pkg/sql/colexec/partition is empty; the complete PR changes only external TIME parsing, LOAD assignment projections, temporal casts and their tests/fixtures. No comparator, partition test, or coverage harness change is included.

    Exact-head changed-closure evidence is green in this same Linux coverage job: full packages pkg/container/types (2.567s), pkg/sql/colexec/external (36.158s), pkg/sql/plan (44.892s), and pkg/sql/plan/function (12.266s) all have terminal PASS events in artifact ut-coverage-diagnostics-attempt-1 (artifact ID 11727496536). All seven directly relevant named regressions also pass, including the typed/staged assignment executor, fractional modes, Parquet precision, and extreme signed-duration cases. A focused local run of these seven regressions on the exact head independently terminated with exit 0. This supports the TIME change closure; the workflow as a whole remains red/pending.

    One failed-jobs rerun of run 38204022899 is authorized after the current attempt finishes. These are deterministic upstream test failures; the rerun will not be reported as proof that either defect is fixed. No source code was changed during this CI investigation.

    The downstream Matrixone Coverage execution / Coverage job has also failed in this attempt: https://github.com/matrixorigin/matrixone/actions/runs/38204022899/job/114675562857. Its full job log shows Verify coverage prerequisites exiting 1 with coverage merge blocked: a required producer did not publish a complete coverage profile; no coverage verdict was calculated. The UT producer profile upload was skipped after the failures above. This is a consequence of producer failure, not a calculated changed-code coverage rejection.

  3. iamlinjunhong commented on Oct 12, 2026

    @iamlinjunhong
    ContributorAuthor

    Additional independently verified occurrence from PR #29152, exact head 388010f0f0ef9133c4f7a89e957fd515e5302327:

    • Run 38203229132, attempt 1.
    • UT Coverage on Ubuntu/x86, job 114661038900: Run coverage unit tests exits 1; Fail on coverage UT failure propagates the failure. Complete job log identifies only pkg/sql/colexec/partition / TestPartitionTopNRejectsUnsupportedOrderType, at topn_test.go:140, with Should be true and Messages: <nil>. There are no build failures. Python provisioning succeeds in this run.
    • Coverage merge, job 114674421597: Verify coverage prerequisites fails because the UT producer did not publish a complete profile. The complete log reports coverage merge blocked: a required producer did not publish a complete coverage profile; no coverage verdict was calculated.

    Reproduced the same assertion, exit 1, on the exact PR head and a separate clean detached current official up/main at 02a2823c2007d5e4fb4ada148e93743df337551a. Baseline status was empty before and after testing. Both use Go 1.27.1, Darwin/arm64, CGo enabled, the same verified read-only native inputs, and this focused command:

    GOMAXPROCS=4 .agents/skills/mo-dev/scripts/mo-cgo-test -p=2 -short -tags matrixone_test -v -count=1 -timeout=120s -covermode=set -coverprofile=<separate temporary output> -run '^TestPartitionTopNRejectsUnsupportedOrderType$' ./pkg/sql/colexec/partition

    This retains CI's short mode, matrixone_test tag, CGo and set coverage mode; it is a focused local reproduction, rather than the CI's Linux/amd64 501-package instrumentation. Both runs select the case and fail at line 140 with a nil Prepare error. Temporary baseline input links were removed by the installed cleanup trap, and the owned clean validation worktree was removed.

    The PR and current official-main bytes match for topn.go, topn_test.go, pkg/compare/compare.go and strcompare.go. The PR's expression-executor changes concern RoutineCall dispatch and row-aligned external evaluation, while this fixture uses only column/literal expressions. Its Prepare path reaches the upstream newCompareFor(T_any) comparator branch added by #29918 before any row sorting or Python execution. Clean-current-main reproduction independently proves the upstream test-contract mismatch; this is not a flaky-candidate classification and #28652's provisioning-timeout mechanism does not apply.

    PR #29152 is two commits behind official main. Its repair task explicitly requires rebasing and pushing to trigger fresh CI before processing new results, so this delivery will use a precise head lease and will not rerun the superseded old workflow. No unrelated partition or comparator code is changed in the Python UDF PR; this issue continues to track the deterministic failure.

  4. self-assigned this
    on Oct 12, 2026
  5. gouhongshen commented on Oct 12, 2026

    @gouhongshen
    Contributor

    CI reproduction record from #29798:

  6. gouhongshen commented on Oct 12, 2026

    @gouhongshen
    Contributor

    Additional exact-head reproduction from #29798:

  7. iamlinjunhong commented on Oct 12, 2026

    @iamlinjunhong
    ContributorAuthor

    PR 29956 completed attempt: ordinary UT and aggregate failures

    The original workflow is now terminal (attempt 1, failure), and no failed-jobs rerun has been requested by this repair lane. Source PR #29956 still has exact head 9669f7a200d553436532262fb668049bc45aa1b0.

    Read the complete failed-job logs using gh run view 38199353350 --log-failed (10,240 lines); all four failed checks map to the same upstream test contract:

    Failed check Job Cause / failing step
    Matrixone CI execution / UT Test on Ubuntu/x86 https://github.com/matrixorigin/matrixone/actions/runs/38199353350/job/114649181294 Unit Testing: make ut; only failed package is partition and only failed test is TestPartitionTopNRejectsUnsupportedOrderType.
    Matrixone UT Coverage execution / UT Coverage on Ubuntu/x86 https://github.com/matrixorigin/matrixone/actions/runs/38199353350/job/114649202552 Same test and assertion; producer exits 1, propagated by Fail on coverage UT failure.
    Matrixone Coverage execution / Coverage https://github.com/matrixorigin/matrixone/actions/runs/38199353350/job/114659729345 Verify coverage prerequisites fails because the producer did not publish a complete profile. No coverage verdict was calculated.
    CI Required https://github.com/matrixorigin/matrixone/actions/runs/38199353350/job/114664449988 verifyResults rejects matrixone-ci: failure; this is an aggregate consequence.

    Ordinary UT log excerpt (Linux/amd64, Go 1.27.1, CGo enabled):

    === RUN TestPartitionTopNRejectsUnsupportedOrderType
      topn_test.go:140: Should be true
      Messages: <nil>
    --- FAIL: TestPartitionTopNRejectsUnsupportedOrderType (0.00s)
    FAIL_UT_CASES=TestPartitionTopNRejectsUnsupportedOrderType,
    UNIT TESTING FAILED: go-test=1, analysis=0
    

    The UT wrapper exits 2 after make ut reports Go-test failure. There is no timeout, race-detector report, compilation failure, or second failing case. Coverage mode and the focused Darwin reproduction from the issue body have the same normalized assertion signature; this is a deterministic upstream oracle mismatch, rather than a flaky-candidate classification.

    Independently verified the complete Linux/amd64 job log linked by the maintainer occurrence above: unrelated PR #29798, run https://github.com/matrixorigin/matrixone/actions/runs/38204952772, attempt 1, exact run head cba088b792357677dde783a44340ac0ace779dc0, job https://github.com/matrixorigin/matrixone/actions/runs/38204952772/job/114666480658. That completed job has the same case, line 140, <nil> assertion, and Go 1.27.1; the enclosing run was later cancelled. Its completed failure remains valid independent evidence.

    Fresh official up/main is now 7af631bdf79e7beb4bb3588e2bfd03ba4852b6cc. It has updated this test to reject tuple/interval keys and accept domainless NULL ANY. This is a source inspection, not a claim that the updated main was run locally or still reproduces the old assertion. The comparison from the original issue body remains historical execution evidence at 5a5501b3....

    The known-open-defect evidence path is satisfied: this issue remains open and covers the precise case/signature; it contains repository-maintainer analysis of the ANY comparator contract and independently linked Linux failures; the PR's complete five-file diff and failing Prepare dependency path do not modify that mechanism, test or CI harness. pkg/compare/compare.go, strcompare.go and partition/topn.go still match current official main. The PR has three newer-main commits absent, including the updated test, but its Decimal256 diff remains unchanged. The failing Prepare path never invokes decimal text parsing.

    Reuse the exact-head types/external owning-package PASS evidence from the issue body: source, tests, native inputs, mode and log hashes are unchanged (Darwin/arm64, Go 1.27.1, -short -tags matrixone_test, wrapper exit 0). Both distributed BVT lanes also finished successfully in this original workflow, although those lane results are not a replacement for the package evidence.

    Per the authorized CI intake procedure, request failed jobs once for run 38199353350 after recording this evidence, and verify a new attempt is accepted. The same old head still contains the old test; acceptance of a rerun will not be described as a code fix or green CI. No source changes or reviewer requests are made, and no second rerun is planned for this same signature.

  8. added
    bot-ready
    and removed on Oct 12, 2026
  9. XuPeng-SH commented on Oct 12, 2026

    @XuPeng-SH
    Contributor

    mo-bot work · mo-bot-local · done

    Commit: f536057430cd35d5b1c883ec469949e917336ebe

    Issue #29968 is already fixed in the assigned revision. Complete compare and partition package tests pass with race detection and set coverage. No duplicate implementation or PR is needed.

  10. added 2 commits that reference this issue on Oct 12, 2026
    7242262
    3e50e1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bot-readykind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions