Repository navigation
feat: low-precision float types bf16/float16/float8/float4 and vecf8/vecf4 vector columns (#20567) - #29554
Conversation
The cuVS cgo bindings imported unsafe directly, which molint's checkunsafe reports once the gpu-tagged files are analyzed. Every unsafe.Pointer conversion now goes through util.UnsafePointer, and the two places that stored an unsafe.Pointer hold the C pointer as *byte instead: the pinned host memory API (GpuAllocPinned, GpuFreePinned, PinnedPool) and the VRAM reservation token. pkg/cuvs no longer imports unsafe. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@aunjgr Thanks for review 5713126545: the GPU-tagged static analysis is now done, on head Commands (repo root, the GPU include paths that
Result on What it found before the fixes:
Validation on
The head also merges main @aunjgr, please re-review against 🤖 Generated with Claude Code |
Main's MO_INDEX_SUB_PART (matrixorigin#31489) took the next function id; VECTOR_MATMUL, VECBLOCK_JSON and VECBLOCK_BINARY move to the ids after it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…error parquet_vector_nonfinite (main matrixorigin#31831) expects main's message for a vecf16 and a vecbf16 element above the type's range. This PR rejects such an element as out of range, naming the type and the input value, as the scalar float16/bf16 types do; both inserts are still rejected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts and merge fixes: - function ids: main took 624..628 for EWM_*; VECTOR_MATMUL, VECBLOCK_JSON and VECBLOCK_BINARY move to 629..631 (FUNCTION_END_NUMBER 632), and aggexec.AggIdOfVectorMatmul to 629 << 32 - mysql_sql.go regenerated with goyacc from the merged grammar - strhashmap.go: both sides kept; the new fixed-key fast path copies bf16/float16/float8/float4 bytes (zeros are stored as +0) - pkg/iscp: copyBytes was removed by matrixorigin#31488; vecf8/vecf4 use CloneBytesAt - TestTypeSwitchFamilies: the EWM window functions take bf16/float16/ float8/float4 samples, decay, policy arguments and event-time ORDER BY keys; parallel UNION ALL projection admits them as IFF conditions; the two plan.Literal readers are tagged partial - vector_distance_semantics.result: the vecf16 overflow message follows this branch's out-of-range error - lowprec_ddl_dml: EWM over the low-precision floats against FLOAT Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ance reference docs/sql/vector-distance-functions.md (matrixorigin#31896) covered six vector types. It now covers vecf8 (MXFP8) and vecf4 (NVFP4): their block layout and quantization, which argument types they pair with, result precision (rounded into the float32 domain except l2_distance_sq), the dimension mismatch error, the result type of every function and operator (subvector/abs/arithmetic return vecf32, sqrt vecf64, normalize_l2 and the copying functions the argument's type), the casts they accept, vecblock_json/vecblock_binary, and that no index or key accepts them. Each statement is checked in vector_distance_semantics.sql; the CAGRA and IVF-PQ rejections are in the GPU case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # pkg/sql/parsers/dialect/mysql/mysql_sql.go # pkg/sql/plan/function/func_cast.go
|
@aunjgr please review it. thanks |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 0829baa567fe07dca1c13e070357be101e8bcf14
Assessment: approve
No actionable findings remain. Reviewed changed behavior and merge interactions, qualified reusable evidence, and reconciled all 200 discussion entries. Historical compatibility and JSONL objections are settled by the applicable contracts; the GPU static-analysis request is supported by the author’s report and source comparison.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Isolation preflight, TestTypeSwitchFamilies and TestVecBlockKernelsGenerated passed; receipts match retained logs and the frozen head.
-
Regenerated SQL parser matches checked-in output apart from its command comment; zero parser conflicts.
-
Frozen CI reports successful unit tests, static analysis, native builds and both multi-CN BVT jobs.
-
Final audit confirmed clean tracked source, coverage of 319 changed files and complete discussion-key accounting. Evidence retained in validation-manifest.json and discussion-assessment.json.
Limitations:
- No fresh native-package, multi-CN or GPU hardware execution in this attempt. Broader coverage relies on frozen CI and qualified author reports; their raw logs were unavailable locally.
# Conflicts: # pkg/sql/plan/function/func_cast.go
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 6d6b2aac3ba134ff7f4b5d9af59c3dbbfb1ca0a7
Assessment: approve
No actionable findings remain. Qualified prior coverage against all 319 changed files, reviewed merge interactions, and reconciled all 202 discussion entries. Historical compatibility and JSONL objections conflict with the applicable contracts; subsequent correctness, accounting and GPU validation concerns are resolved.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Isolation preflight, TestTypeSwitchFamilies and TestVecBlockKernelsGenerated passed.
-
Regenerated parser matches after normalizing generated command/source-path comments; zero grammar conflicts.
-
Frozen current-head CI reports successful unit tests, static analysis, native builds and both multi-CN BVT jobs.
-
Final audit verified frozen inputs, clean source, complete discussion coverage and receipts against retained logs. Evidence is recorded in validation-manifest.json.
Limitations:
-
No fresh native-package, race, SQL-server, multi-CN or GPU hardware execution. Broader coverage uses frozen CI and qualified author/prior-review evidence; their raw logs were unavailable locally.
-
Initial parser-comparison and audit failures concerned comparison formatting; both were corrected, with failed and successful evidence retained.
…#32039 visitEncodedPrimaryKeyVector took over the switch from EncodePrimaryKeyVector, so its baseline key no longer matched. Low-precision floats and VECTOR columns are rejected as primary key columns at DDL; tag the switch and drop the stale baseline entries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
mo-bot review · Commit: "interrupted" |
# Conflicts: # pkg/container/vector/vector.go
|
@aunjgr The GPU-tagged static analysis you asked for on Oct 30 was already done and is in the PR description: on @fengttt @XuPeng-SH if aunjgr isn't available, could one of you dismiss the Oct 30 review? It's the only thing keeping the PR out of the merge queue. |
…loats unrounded matrixorigin#32092 compares a JSON number outside FLOAT's range by its float64 value instead of failing. Apply the same to bf16/float16/float8/float4: inside the type's finite range the JSON number is rounded to the type's grid as before, outside it compares unrounded. The numeric peer keeps its range check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 1e8946a474f8c858cdc9a6f50de8e79091a2be73
Assessment: approve
No actionable defects remain. The feature reuses existing codec, key, metric and aggregate owners; bounded shared configuration and GPU tiles justify their added state. Current merge interactions are closed. Historical mixed-version objections are superseded by the shutdown-only policy, and restoring the disputed JSONLINE null-marker fallback would regress intentional behavior.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete 320-path change map, qualifying prior coverage for 295 unchanged paths and independently inspecting all 25 changed paths and affected consumers.
-
Read all 206 discussion entries and six linked issue contexts; saved discussion-assessment.json with exact key coverage.
-
Preflight passed; exact-head CPU native prerequisites built successfully and passed repository provenance verification.
-
Full types, vector and metric package tests passed, including type-family completeness and generated-kernel consistency.
-
112 focused top-level tests passed across function, aggexec, colexec and mysql parser packages.
-
Parser generation reproduced exactly after invocation-header normalization. Final source audit verified frozen inputs, preserved persisted IDs and unchanged source.
-
Reconciled commands, exits and retained logs in validation-report.json. Frozen CI records 22 successful contexts; 14 skipped and two neutral contexts were excluded from passes.
Limitations:
-
Local execution used the CPU build. Historical GPU, race and static-analysis evidence was source-qualified; no fresh GPU or race run is claimed.
-
Accepted GPU approximation and CPU subnormal-grid limits remain; broad device-scale performance was not remeasured.
-
Parser receipt fingerprint capture timed out; the final audit independently verified the exact frozen grammar and reproduced parser hashes.
-
Older scalar-design wording about outside-range JSON errors is stale; current behavior follows main's wider-value ordering contract.
aunjgr
left a comment
There was a problem hiding this comment.
Post-merge follow-up at 1e8946a. This is a focused re-audit of my earlier blockers, not a new approval of the entire low-precision feature.
The substantive CPU decoding and ID-compaction findings are addressed in the current source: NVFP4 full-unit kernels take the At-decoding recovery path when the combined scale is subnormal; the decode-contract tests include amplified smallest-float32 inputs across unit boundaries; and VECTOR_MATMUL compaction/merge identify text by (offset,length), with the empty-ID/"winner" regression covering both operations and allocation-account modes. The function-ID conflict is also removed: FORMAT_BYTES/FORMAT_PICO_TIME remain 596/597, while VECTOR_MATMUL and the block introspection functions use 629..631.
I withdraw my earlier old-peer/MORPC admission objections. The documented deployment contract is full-cluster shutdown upgrades, not mixed-version execution; demanding rolling-upgrade capability negotiation here was the wrong requirement.
No remaining blocker found in this follow-up scope. This pass was source/test inspection; I did not rerun the full feature suite or validate GPU execution.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #20567.
What this PR does / why we need it:
Introduce scalar
bf16,float16,float8(E4M3),float4(E2M1), and block-scaled vector columnsvecf8(N)/vecf4(N), with shared codecs, float32 expression promotion, casts, comparison, storage, import/export and MySQL transport. Existing key/domain restrictions and canonical finite-value contracts remain enforced.VECTOR_MATMULretains bounded configuration/accounting, state merging and CPU execution; GPU execution keeps its documented numerical and device-admission limits.Designs:
docs/design/20260929-low-precision-scalar-floats.mdanddocs/design/20260930-low-precision-vector-storage.md. SQL reference for the vector types:docs/sql/vector-distance-functions.md.Rebase and review corrections
Rebased the exact cumulative feature tree onto main
3c07fac240311d6f2b706674614ed6034e97ff79. The original 159 commits, including 32 merges, are preserved in an archive ref and exact raw-object manifest; author attribution is retained in the snapshot commit. All 48 overlapping paths and nine conflicts were reconciled; main-only files are preserved.RowToStringnow formats widened numeric values, rather than integer backing codes. This repairs checkpoint SQL-LOAD CSV round trips (for example,1.5must remain1.5). Normal/constant/NULL handling uses the shared vector owner; raw serialization and ordinary scalar cases are unchanged.<=>directly, without casting both sides to vecf32.ALTER TABLE ... ADD COLUMN c <bf16|float16|float8|float4> NOT NULLwithout aDEFAULTbackfills existing rows with0, asFLOATdoes (COPY and default algorithms); the implicit NOT NULL value previously fell through tonull.FLOAT: a JSON number is rounded and range-checked as CAST to the type does it, and a JSON string, object or array never equals a number ('"1.5"'is not1.5). Before this, JSON compared with these types kept the old cast-to-float path.FLOATworks, bf16/float16/float8/float4 now behave the same (found by running each SQL feature onFLOATand on the new types): a user variable holding one of these values computes in DOUBLE; a constant expression compared with the column (a = ABS(-0.1)) is folded and rounded as a literal is; hex and bit literals are unsigned integers; JSON, YEAR and ENUM cast as they cast toFLOAT; text that is not a number converts to its numeric prefix withFLOAT's warning in MySQL mode (values outside the type's finite range still error);SERIALencodes the stored bits in tuple elements of their own type, ordered as the values, andSERIAL_EXTRACTreturns them;INFORMATION_SCHEMA.COLUMNS.NUMERIC_PRECISIONis the significand bits (8/11/4/2).TestTypeSwitchFamiliesalso checks==/!=chains and[]types.T/map[types.T]literals that name part of a type family; the existing sites were reviewed and baselined.BLOBis not a vector: a cast,INSERT … VALUES,INSERT … SELECT, a prepared parameter or anUPDATEwith it is an error for every vector type, as''is for anINTcolumn (before,vecf32errored onVALUES ('')but stored NULL forINSERT … SELECT ''and a prepared''; vecf8/vecf4 stored NULL on every path). NULL stays NULL;LOADstill reads an empty field as NULL..agents/skills/mo-dev/references/upgrade-compatibility.md, main docs(skills): shutdown-only upgrade contract for agent reviews #31287), so the types and functions take no MORPC version and no capability gate; the branch's earlier low-precision protocol gate (remote placement, execution-stream confirmation, persisted-expression floor, column-authoring fence) is removed, and main's existing gates are unchanged. The types are additive persisted state: data written before them reads as before (merges0bf7ad2bf8,3b5ebd55d3,0bce000fa2,334d14ae91,8841673f3e,64573711a1,ba4f725d19,4d5938c30a,56ac42ed39,9cf7b69221,1543470717,9a51b315ecand6943941198, main24c1ac897b). VECTOR_MATMUL, VECBLOCK_JSON and VECBLOCK_BINARY take the next free function ids after main's, andaggexec.AggIdOfVectorMatmulfollows VECTOR_MATMUL; main's function ids are unchanged, and only the end marker advances. Main's TIMESTAMPADD SECOND float switch is taggedtypeswitch:partial: bf16/float16/float8/float4 counts widen to float32 at resolution. Main's in-memory sort-key filter switch (encodeMemSortKeySpecs) is taggedtypeswitch:partial: the four types are rejected as primary and cluster keys. Main's quantileExactWeighted casts these arguments to FLOAT when it resolves, so its switches are tagged; main's indicator window kernels and local ranks read them as float32, which holds them exactly, and return what FLOAT returns. Text converts as main's FLOAT conversion (Fix decimal rounding and MySQL text-to-float casts #31191) does: radix text is its integer value, other text its decimal prefix ('inf'/'nan'are 0), and truncated text in a strict INSERT/UPDATE is an error. Main now escapes every CSV export value informatOutputString; the vecf8/vecf4 export case passes the raw text instead of escaping it a second time. Main moved the AVX-512 metric loops into//go:noinlinehelpers; the branch's VZEROUPPER clear (archsimd.ClearAVXUpperBits) is in each helper.q×topkindex array, allocated through the aggregate's allocation account and counted bySize, instead of maps on the Go heap (review P2). Merge preflight allocates that array for every merge target, so a merge that passes preflight cannot fail on it inBatchMerge(review P2).topksort scratch; its configuration parse is admitted before it allocates (the account is attached first and a non-allocating bound reserved); a fractional or exponent-form distance is encoded without the integer parsers' error allocation (review P2).vecblock_jsonprints-0, and parsing it now restores the negative-zero code (E4M30x80, E2M10x08) instead of code 0, so export/reload no longer changes cell bytes. JSONLLOADwrites an object value back with its original number lexemes, so a-0element reloads to its negative-zero code in both the object and array formats. The quantizing encoder still stores a computed zero as code 0. A number in the exact text must denote its float32 value without rounding (the exact value, or its shortest float32 or float64 text, in any notation);1.00000001, which float32 parsing rounds to1, is rejected.65505for float16) is out of range although it rounds back to the maximum. Casts and writes reject it and comparisons with it stay wide; the same applies to the vecbf16/vecf16 text parser, the vector narrowing cast andVECTOR_MATMULqueries. A bf16 text or wider source is checked by its float32 value, so the printed maximum3.3895314e+38loads back. Comparison narrowing of a literal or prepared parameter uses the same admission rule as CAST, so that printed maximum also narrows and matches the row it was inserted as. Narrowing applies only when the other operand is a low-precision column, for literals and prepared parameters alike (CAST(1.1 AS FLOAT4) = 1.1and= ?both compare wide), and a decimal literal of any width, including a numeral beyondDECIMAL(38), narrows by its exact value.VECTOR_MATMULrejects a JSONnullquery coordinate or query (query i: coordinate j is null) instead of reading it as 0, for every supported column type. A supplied options argument that is empty text orNULL(including a NULL user variable) is an error rather than the defaults, and aNULLqueries argument is an error; an omitted options argument still selects the defaults.ewmMean/ewmVar/ewmStd/ewmCov/ewmCorr, feat(sql): add ewmMean/ewmVar/ewmStd/ewmCov/ewmCorr window functions #31941) take bf16/float16/float8/float4 samples, alpha/half-life, policy arguments and event-timeORDER BYkeys as they takeFLOAT, and return whatFLOATreturns; main's parallel UNION ALL projection admits these types as IFF conditions asIffConditionTruthyAtreads them. Main's new fixed-key hash fast path copies their bytes: a zero of either sign is stored as +0, so the bytes are the key. The two EWM switches that readplan.Literalare taggedtypeswitch:partial(no literal carries these types). Main refactor: consolidate unused code and duplicate responsibilities #31488 removedpkg/iscpcopyBytes; the vecf8/vecf4 row extraction usesCloneBytesAtas main's other cases do (mergecd4d31b4f3).docs/sql/vector-distance-functions.md(main docs(vector): one reference for vector function and distance semantics (inner_product = -dot) #31896) covers vecf8/vecf4: the block layout and quantization, the argument types each distance pairs with (vecf8, vecf4, vecf32, vecf64; not the other narrow types), precision (rounded into the float32 domain exceptl2_distance_sq), the dimension-mismatch error, every function's result type (subvector/abs/arithmetic return vecf32,sqrtvecf64,normalize_l2and the copying functions the argument's type), the accepted casts (text, vecf32, vecf8↔vecf4),vecblock_json/vecblock_binary, and that no index or key accepts the types. Each statement has a line incases/vector/vector_distance_semantics.sql; the CAGRA/IVF-PQ rejections are ingpu_cases/vector/vector_distance_semantics_gpu.sql(0b32a9a9f0).max. Main's charset migration, COPY strict assignment, diagnostics/folding and prepared exact-source behavior are retained. The 16-byte Type layout and existing protobuf fields are unchanged.Validation
The fixes add no new retained state, locks or execution framework. The size query runs only during block-scaled matmul configuration; decoded equality's extra linear work is limited to differently encoded block vectors. Ordinary scalar DML paths retain their previous code.
Author run at
e9fc0a159e(after merging maine033d4a587, GPU build): everypkg/test package compiles; the affected Go packages andTestTypeSwitchFamiliespass; golangci-lint v2.14.0 reports no issues in the changed packages; BVT-m run0 failures:cases/dtype8856 (32 ignored),cases/array1501/1501,cases/vector3460 (2 ignored),cases/load_data1607 (5 ignored),cases/function22490 (150 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
eebad1d1ac(merge-preflight fix, GPU build):pkg/sql/colexec/aggexecandpkg/sql/colexec/grouppass; the new and related tests pass-race -count=20; golangci-lint reports no issues; BVT-m run0 failures:cases/vector/vector_matmul.sql109/109,gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
6943941198(after merging main24c1ac897b, clean GPU rebuild):TestTemporaryTablePhysicalNameIsSessionScoped5/5 (the CI failure oneebad1d1acwas the ISCP fixture race main fixed in #31288),TestTypeSwitchFamilies,pkg/container/types,pkg/sql/plan/function,pkg/sql/colexec/aggexecandpkg/sql/colexec/grouppass; everypkg/test package compiles; BVT-m run0 failures:cases/dtype8856 (32 ignored),cases/array1501/1501,cases/vector3460 (2 ignored),cases/load_data1607 (5 ignored),cases/function22490 (150 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
64b29a2034(tuple-decoder fix, GPU build):pkg/container/types(withTestTypeSwitchFamilies),pkg/sql/plan/functionandpkg/sql/colexec/...pass; golangci-lint reports no issues; BVT-m run0 failures:cases/dtype8871 (32 ignored),cases/function22490 (150 ignored).Author run at
c22e8a35d4(aggregate memory audit, GPU build):pkg/sql/colexec/aggexec(with and without thegputag) andpkg/sql/colexec/grouppass; the new and accounted fill/merge tests pass-race -count=10; golangci-lint reports no issues; BVT-m run0 failures:cases/vector/vector_matmul.sql109/109,gpu_cases/vector/vector_matmul_gpu.sql71/71,cases/vector3460 (2 ignored),cases/array1501/1501.Author run at
c6480649e5(fractional-distance flush allocation):pkg/sql/colexec/aggexec(with and without thegputag, and under-race) andpkg/sql/colexec/grouppass; the flush allocation tests pass-race -count=10; golangci-lint reports no issues; BVT-m run0 failures:cases/vector/vector_matmul.sql109/109,gpu_cases/vector/vector_matmul_gpu.sql71/71,cases/vector3460 (2 ignored).Author run at
af8bbc4f60(merge of main802376360c, no conflicts; function ids unchanged):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/sql/plan/function,pkg/sql/plan,pkg/sql/colexec/aggexec,pkg/sql/colexec/groupandpkg/vectorindex/hnsw/...pass; BVT-m run0 failures:cases/dtype8895 (32 ignored),cases/function22527 (150 ignored),cases/vector3499 (2 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71,pessimistic_transaction/vector/vector_hnsw_delete_insert.sql56/56 ×3.Author run at
eead4d0574(merge of maind4ffbae43d;mysql_sql.goregenerated from the mergedmysql_sql.y, 0 grammar conflicts; function ids unchanged):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/sql/plan,pkg/sql/plan/function,pkg/sql/colexec/aggexecandpkg/sql/parsers/...pass; BVT-m run0 failures:cases/dtype8895 (32 ignored),cases/function22550 (150 ignored),cases/vector3499 (2 ignored),cases/dml/insert3090 (22 ignored),cases/load_data1609 (5 ignored),pessimistic_transaction/vector/vector_hnsw_delete_insert.sql58/58,gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
d57e5e560d(SERIAL_EXTRACT validates vecf8/vecf4 cells, review P2):pkg/sql/plan/functionandpkg/container/typespass;TestSerialExtractBlockScaledCellfails on all 12 invalid-input subtests without the check; golangci-lint reports no issues; BVT-m run0 failures:cases/dtype8906 (32 ignored;dtype/vecblock.sql253/253 twice),cases/function22550 (150 ignored),cases/vector3499 (2 ignored).Author run at
4ecd752f61(merges of main1fd12d526eand7e0c9d94fc;array_str.goconflict resolved keeping exact bf16/f16 element rounding with main's context-aware errors;mysql_sql.goregenerated with goyacc, 0 conflicts;7b55465b2cclassifies the new types in main's sort-rollup type switch, with a ROLLUP BVT underSORT/HASH/COST):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/sql/plan,pkg/sql/plan/function,pkg/sql/colexec/aggexec,pkg/vectorindex/...(metric also withGOEXPERIMENT=simd) andpkg/sql/parsers/...pass; BVT-m runon a fresh data dir:cases/dtype8916 (32 ignored),cases/function22597 (150 ignored),cases/vector3498 + 1 flake (2 ignored;vector_ivf_membership.sqlrow 163 readtable_statsright aftermo_ctlflush, 160/160 on 3 reruns),cases/array1501,cases/hint662,cases/load_data1609 (5 ignored),cases/fulltext1978 (3 ignored),cases/auto_increment924,cases/ddl8825 (168 ignored).Author run at
410761af13(merge of main23488e1eb2: conflicts inexport.go,func_builtin_jq.go,func_cast_test.goresolved onto main's new helpers,mysql_sql.goregenerated with goyacc, usearch rebuilt for main's new tarball;a3a9dbf506classifies the new types in seven new main type switches (float text formatting counts the low-precision types; six tagged partial with reasons);410761af13follows main's MySQL float text in the low-precision BVTs, matchingFLOAT/DOUBLE/vecf32, and checks the bf16 maximum's new six-digit text loads back):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/sql/plan,pkg/sql/plan/function,pkg/sql/colexec/{aggexec,window,table_function,external},pkg/vectorindex/...(metric also withGOEXPERIMENT=simd) andpkg/sql/parsers/...pass; golangci-lint reports no issues; BVT-m runon a fresh data dir:cases/dtype8916 (32 ignored;lowprec_float.sql431/431,vecblock.sql253/253 after the text update),cases/function22669 (150 ignored),cases/vector3496 + 3 flakes (2 ignored;vector_ivf_membership.sqltable_statsright aftermo_ctlflush, 160/160 on 3 reruns),cases/array1501,cases/hint671,cases/load_data1609 (5 ignored),cases/fulltext2009 (3 ignored),cases/window2792 (7 ignored),cases/auto_increment924,cases/ddl8825 (168 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
ecd90a635f(review fixes: vecf8/vecf4 sort compares cells in place; hash-key preflight sizes the canonical vecf8/vecf4 key; VECTOR_MATMUL configuration admitted before parsing; volatile/real-time configuration rejected; JSON options accepted):pkg/sort,pkg/common/hashmap/...,pkg/sql/colexec/aggexec(with and without thegputag),pkg/sql/colexec/group,pkg/sql/plan,pkg/sql/plan/function,pkg/sql/compileandpkg/container/typespass; admission, shared-configuration and sort tests pass-race -count=10; golangci-lint reports no issues; BVT-m run:cases/dtype8917 (32 ignored),cases/function22668 + 1 timing flake (func_datetime_now.test, 50/50 on rerun),cases/vector3505 (2 ignored),cases/array1501,cases/window2792 (7 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
e38b4def66(CI fix forTestVectorMatmulParseBoundCoversParse: JSON queries are decoded once, the row scan finds a null query or coordinate, and the parse bound carries a 2x margin, at least 2.89x over the measured allocation):pkg/sql/colexec/aggexecpasses 5 times in a row, with thegputag, under-race, and without the simd experiment with coverage.Author run at
96cb007bc9(review P2: the admission bound reads neither options nor query values; options and JSON queries are parsed in onesonic/astSAX pass, query values rounded once from their text to float32):pkg/sql/colexec/aggexecpasses 3 times in a row and with thegputag; the options, rounding, scan and admission tests pass-race -count=5; golangci-lint reports no issues; BVT-m run:vector/vector_matmul.sql119/119,dtype/vecblock.sql253/253,gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
8bc61f7f3f(merge of mainb01e952ad1,partition.gokeeps main's JSON partitioning and the new types' cases; self-review fixes: the JSON row scan follows at most 8 levels, options and vecblock queries are checked withencoding/json.Valid(nesting limit, trailing text), duplicate-key error text, vecblock and binary bound terms, limit checks before options with or without an account, every aggregate factory attaches the account before the configuration):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/sql/colexec/aggexec(with and without thegputag),group,window,timewin,compile,hashmap,function,partition,sort,planand the parsers pass; the new and affected tests pass adaptive-race -count(N 25 to 100) and the owning packages once under-race; golangci-lint reports no issues; BVT-m run0 failures:cases/vector3509 (2 ignored),cases/dtype8991 (32 ignored),cases/function22708 (150 ignored),cases/window2826 (7 ignored),cases/array1501,gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
6e2a82ae52(sonic v1.15.5, whose native decoder rounds float32 twice (bytedance/sonic#884), so float32 HNSW CDC batches decode withencoding/json; vecblock JSON queries validated before their elements are collected; self-review fixes):pkg/sql/colexec/aggexec(with and without thegputag, once under-race),pkg/vectorindex,pkg/vectorindex/hnsw/...,pkg/iscp,pkg/sql/colexec/table_function,pkg/sql/plan,pkg/catalogandpkg/fulltext2/...pass; new tests pass adaptive-race -count; golangci-lint and molint report no issues; BVT-m run0 failures:cases/vector3509 (2 ignored),pessimistic_transaction/vector927 (42 ignored),cases/dtype8991 (32 ignored),cases/fulltext2009 (3 ignored),pessimistic_transaction/fulltext2932/932,gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
daef3c9f06(GROUP_CONCAT selects its accounted DISTINCT mode from bothSetAllocationAccountandSetExtraInformation, so the Group factory's account-first order keepsDISTINCT ... ORDER BYon the ordered representation; regressionTestGroupConcatAccountedDistinctModeIndependentOfOrderfails without the fix):pkg/sql/colexec/aggexec(also once under-race),group,windowandtimewinpass; golangci-lint reports no issues; BVT-m run0 failures:cases/function22708 (150 ignored),cases/vector/vector_matmul.sql119/119.Author run at
820f57e2d5(merge of main950e548b5a; full-PR review fixes: IF/IFF/CASE/COALESCE mixing a low-precision float with another type resolve as withfloat32, Parquet export writes vecf8/vecf4 as the exact cell text, the low-precision scalars format as numbers in tuple and debug printers,subvectoron vecf8/vecf4 returnsvecf32):pkg/container/types,pkg/sql/plan/function,pkg/sql/plan,pkg/frontend,pkg/sql/colexec/aggexec,group,tae/common,tae/indexandlogtailreplaypass; golangci-lint reports no issues; BVT-m run0 failures:cases/dtype8997 (32 ignored),cases/function22924 (150 ignored),cases/array1517,cases/vector3531 (2 ignored); at the mergeee08413830,cases/window2826 (7 ignored) andgpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
c592c6ac3b(merge of maind39d8a4034: main's DECIMAL UNSIGNED admission took the next function ids, sovector_matmul,vecblock_jsonandvecblock_binarytake the ones after it; DECIMAL UNSIGNED admits bf16/float16/float8/float4 as it admits FLOAT;subvectoron vecf8/vecf4 documented as returningvecf32equal tosubvectorover thevecf32cast):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/container/vector,pkg/sql/plan/function,pkg/sql/plan,pkg/sql/colexec/aggexec,pkg/tools/checkpointtooland the parsers pass; golangci-lint reports no issues; BVT-m run0 failures:cases/dtype9159 (32 ignored),cases/function22924 (150 ignored),cases/vector3531 (2 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
42eeeb2a77(merge of mainc8534cc3e2: main kept the previous IF/CASE checkers as the native-mode copies and the branch's low-precision CASE handling had merged into the native copy only, so both modes now carry it and the conditional tests run in both modes; main's new TOP pruning excludes vecf8/vecf4 as it excludes the other float arrays; GPU-tagged static analysis):TestTypeSwitchFamilies,pkg/container/types,pkg/common/hashmap/...,pkg/sql/util,pkg/sql/colexec/top,aggexec,group,pkg/sql/plan/function,pkg/sql/planandpkg/vectorindex/...pass in the GPU build; BVT-m run0 failures:cases/dtype9438 (32 ignored),cases/function22976 (150 ignored),cases/vector3531 (2 ignored),cases/array1517,cases/window2838 (7 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71,cases/vector/vector_matmul.sql119/119. GPU-tagged static analysis (CI'sstatic-checkpasses no build tag, so//go:build gpufiles are not analyzed there): the configured analyzers with the GPU include paths ofMO_CL_CUDA=1and thegputag, over./...—molint check -mod=readonly -tags gpu ./...andgolangci-lint run -c .golangci.yml --build-tags gpu ./...(golangci-lint v2.14.0). On the merge they reported two findings in files this PR adds:checkunsafeinpkg/cuvs/blockscaled_matmul.goandpreallocinpkg/cuvs/blockscaled_matmul_test.go;42eeeb2a77passes the C pointers throughutil.UnsafePointerand preallocates. On42eeeb2a77the findings equal those of the same commands on mainc8534cc3e2: 16 molintcheckunsafein GPU files this PR does not change (pkg/cuvs/{adhoc,brute_force,cagra,device_memory,distance,helper,helper_test,ivf_flat,ivf_pq,kmeans}.go,table_function/{filter_helper,ivfpq_create}_gpu.go,{cagra,ivfpq}/probe_gpu.go,{cagra,ivfpq}/plugin/search/search_gpu.go) and 1 golangciineffassigninpkg/cuvs/search_float_test.go(unchanged); 0 new.Author run at
dbfa3ad95e(GPU-tagged static-analysis findings fixed, including those main already had: the GPU table functions and the CAGRA/IVF-PQ search and probe files useutil.UnsafeToBytes,util.UnsafeSliceCastandutil.UnsafeSizeOf;pkg/cuvsno longer importsunsafe: its cgo calls pass pointers throughutil.UnsafePointer, and the pinned host-memory API and the VRAM reservation token hold the C pointer as*byte; apkg/cuvstest no longer assigns a value it overwrites):molint check -mod=readonly -tags gpu ./...(the versionMakefilepins) andgolangci-lint run -c .golangci.yml --build-tags gpu ./...(v2.14.0), with the GPU include paths ofMO_CL_CUDA=1, report 0 findings; GPU unit tests pass forpkg/cuvs/...,pkg/vectorindex/...,pkg/sql/colexec/table_functionandpkg/sql/colexec/aggexec; BVT-m runoftest/distributed/gpu_casespasses 1959/1959 (64 files).Author run at
f5fad15240(merge of mainc42cf40214: main'sMO_INDEX_SUB_PARTtook the next function id, sovector_matmul,vecblock_jsonandvecblock_binarymove to the ids after it; main's other commits do not touch GPU-tagged files orpkg/cuvs, so the GPU-tagged static analysis ofdbfa3ad95estill applies):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/container/vector,pkg/sql/plan/function,pkg/sql/plan,pkg/sql/colexec/aggexecandgrouppass; BVT-m run0 failures:cases/vector3531 (2 ignored),cases/dtype9438 (32 ignored),cases/function22976 (150 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71.Author run at
63b315eec7(main's newparquet_vector_nonfinite.sqlexpects main's message for avecf16/vecbf16element above the type's range; this PR rejects such an element as out of range, naming the type and the input value, as the scalarfloat16/bf16types do, so the expected result is updated; both inserts are still rejected):cases/load_dataBVT-m run1730 (5 ignored), 0 failures; the other cases with that message (dtype/vecblock,vector/vector_nonfinite_conversion,array/array_nonfinite) pass.Author run at
0b32a9a9f0(mergecd4d31b4f3of main0df8dded57: main's EWM window functions took the next function ids, sovector_matmul,vecblock_jsonandvecblock_binarymove to the ids after them, andaggexec.AggIdOfVectorMatmulfollows;mysql_sql.goregenerated from the mergedmysql_sql.y; then the vecf8/vecf4 reference doc0b32a9a9f0; GPU build):pkg/container/types(incl.TestTypeSwitchFamilies),pkg/sql/plan/function(incl.TestAggregateExecutorIDs),pkg/sql/colexec/aggexec,pkg/sql/plan,pkg/sql/compile,pkg/sql/colexec/window/...,pkg/common/hashmap,pkg/iscpand the parsers pass;go vetof./pkg/... ./cmd/...(gpu tag) reports nothing; BVT-m run0 failures:cases/vector3721 (2 ignored),cases/dtype9476 (32 ignored),cases/window3222 (7 ignored),cases/function23144 (150 ignored),gpu_cases/vector/vector_matmul_gpu.sql71/71,gpu_cases/vector/vector_distance_semantics_gpu.sql50/50. In thecases/functiondirectory run,func_datetime_now.testrow 122 (timestampdiffof twonow()values aroundsleep(1)≥ 1 s) returned 0 in an overnight run wherefunc_math_floor.testtook 40793 s andwindow.sql18395 s; rerun of the three files: 50/50 (6.9 s), 95/95 (3.1 s) and 1106/1106 (55 s).Author run at
1543470717(after merging mainbe66367687, GPU build): the affected Go packages andTestTypeSwitchFamiliespass; everypkg/test package compiles; BVT-m run0 failures:cases/dtype8738 (32 ignored),cases/array1501/1501,cases/vector3460 (2 ignored),cases/load_data1607 (5 ignored),cases/function22196 (150 ignored), and the case file the merge changed. JSONLINE keeps main's NULL rule: only JSONnullis NULL, a JSON string"\N"is text, and$binarypayloads round-trip byte-exact.Author run at
9cf7b69221(after merging main5fb586e142, GPU build): the affected Go packages andTestTypeSwitchFamiliespass; BVT-m run0 failures:cases/dtype8738 (32 ignored),cases/array1501/1501,cases/vector3460 (2 ignored),cases/load_data1607 (5 ignored), and the 3 case files the merge changed.Author run at
1575c6a696(after merging maine19f698de0, GPU build): everypkg/test package compiles;TestTypeSwitchFamiliesand the affected Go packages pass; golangci-lint v2.14.0 reports no issue in the PR's packages; BVT-m run0 failures:cases/dtype8738 (32 ignored),cases/array1501/1501, and the 11 case files the merge changed;cases/vector3449 of 3460 (2 ignored) in the run right after the restart, where three HNSW/IVF files missed the index plan, and those three files pass 89/89 when rerun.Author run at
7af7fc1618(afterb2e09f6b5e, and9d4e8b3130: affected Go packages pass, BVT 0 failures forcases/vector3455,cases/array1501,cases/dtype8738,gpu_cases/vector1360,cases/function22118,cases/load_data1578,cases/prepare4129,cases/dml7936;TestTypeSwitchFamiliesand the affected Go packages pass; BVT-m run0 failures:cases/dtype8738 (32 ignored),cases/vector3410 (2 ignored),gpu_cases/vector1360/1360,cases/function22118 (150 ignored),cases/array1501/1501,cases/load_data1578 (5 ignored),cases/ddl8610 (168 ignored),cases/prepare4129 (1 ignored),cases/table2019 (19 ignored),cases/dml7936 (120 ignored))) on a real device (GPU build,MO_CL_CUDA=1):TestTypeSwitchFamiliesand the affected Go packages pass (container/types,sql/plan/...,sql/compile,aggexec,external,externalwrite,frontend,pb/plan,defines); each new regression fails with the fix reverted. BVT-m run, 0 failures:cases/dtype8672 (32 ignored),cases/vector3398 (2 ignored),gpu_cases/vector1360/1360.GPU-tagged static analysis reports no findings on
dbfa3ad95e(see the author run atdbfa3ad95e). Device-scale performance remains pending, not counted as a pass; no current end-to-end speedup claim is made. Rolling deployment does not apply: MatrixOne upgrades by full-cluster shutdown only. CPU evidence does not establish GPU acceptance; the documented approximation/subnormal limits remain in force.🤖 Generated with Claude Code