Skip to content

Revert "fix(sql): return mathematical dot product from INNER_PRODUCT" (#29711) - #29790

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
ck89119:issue-29711-revert-main
Oct 9, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
ck89119:issue-29711-revert-main

Conversation

@ck89119

@ck89119 ck89119 commented Oct 9, 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:

Related to #29703. This reverts the fix rather than resolving or closing the issue.

What this PR does / why we need it:

Revert #29711 at the user's request.

This reverts commit 908166384d32e378a72cc3b5ef9e7075603c4e81 in full. All 47 reverted paths match the original commit's parent; subsequent unrelated main changes are preserved.

  • Restore historical INNER_PRODUCT(a, b) = -Σaᵢbᵢ semantics across scalar, batch, narrow-vector, and index score boundaries.
  • Restore ASC maximum-inner-product nearest-neighbor rewrites and the corresponding IVF ordering, reranking, and range handling.
  • Restore the previous UT/BVT fixtures and results, and remove the reverted PR's mathematical-dot-product migration document and new semantics cases.

Compatibility

Applications migrated for #29711 must undo their score-sign, ordering, and threshold changes when deploying this revert. Index storage formats remain unchanged. Avoid mixing nodes with opposite SQL INNER_PRODUCT semantics.

Validation

On macOS arm64, using Go 1.27.1 from go.mod and freshly rebuilt native prerequisites:

  • Focused tests and full owning-package suites passed for moarray, metric, brute_force, ivfflat, plan, and function.
  • TestIssue28378IVFFlatRemoteLifecycle passed, including the embedded two-CN IP query and remote lifecycle assertions.
  • Changed executable-line coverage: 27/29 = 93.1%.
  • make build, matching gofmt, incremental go vet, repository-pinned golangci-lint 2.14.0 (0 issues), and diff checks passed.
  • Two local single-CN mo-tester value-comparison rounds (-g -n) passed for 12 affected CPU BVT files: array, array_vecnarrow, array_vecnarrow_ops, array_vecuint8, vector_finite_extreme, vector_func, vector_index, vector_index_optype_matrix, vector_ivf_mode_advanced, vector_ivf_multicn_search, vector_hnsw, and vector_hnsw_f64.
  • HNSW files retain 21 historical [Bug]: bvt test failed with inconsistent result of async index update tasks #22794 ignored statements each; the changed IP statements are outside those blocks. No skips or comparison rules were added.

Limits: BVT comparisons did not validate column metadata. The pure revert restores historical golden floating-point tails and metadata, including pairwise headers; strict metadata parity is not claimed. Actual CUDA/GPU execution, standalone/compose multi-CN BVT, and the full issues package suite were not run. The embedded lifecycle UT is two-CN evidence; the local BVT remains single-CN evidence.

@mergify mergify Bot added kind/bug Something isn't working kind/documentation Improvements or additions to documentation kind/test-ci kind/api-change labels Oct 9, 2026
@matrix-meow matrix-meow added the size/L Denotes a PR that changes [500,999] lines label Oct 9, 2026
@ck89119
ck89119 marked this pull request as ready for review October 9, 2026 10:39
@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 →

This branch had an error being deployed

1 failed deployment
ci — b2cd42de Deployed Oct 9, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/api-change kind/bug Something isn't working kind/documentation Improvements or additions to documentation kind/test-ci size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants