Skip to content

[Bug]: Partitioned ALTER ADD HNSW/IVF-Flat INDEX loses QUANTIZATION quotes and returns syntax error 1105 #32882

Closed as not planned

Description

@slyunnn

Scope update (2026-11-18): Partition functionality is not ready and partition testing is deferred under the revised verification scope. The observations below are retained, but further partition testing and regression delivery are deferred. This issue is not counted as a failure of the current nonpartitioned #31583 scale acceptance.

Description

On a RANGE-partitioned table, valid ALTER TABLE ... ADD INDEX ... QUANTIZATION 'float16' returns raw syntax error 1105 referring to an internally unquoted
float16. Both HNSW and IVF-Flat reproduce it with only valid source vectors.
The identical ALTER on a nonpartitioned table succeeds. Standalone CREATE INDEX
accepts the quoted option on a partitioned table (its parent metadata has a
separate bug, #32881).

Environment

  • Fresh remote main 517e1695388cbaf1135238d5ab0c19a4556fb551, fetched/built 2026-11-18.
  • Binary and SQL git_version(): 517e169538.
  • Binary SHA256 275869a51ef79f72a6d99e75136746a16987babbbaa94aa5cabae3b6e50ddf46.
  • Isolated macOS ARM64 single CN/TN/logservice, PyMySQL / MySQL protocol.
  • Service source unchanged; no concurrent DDL or hidden-table writes.

Reproduction

SET experimental_hnsw_index=1;
CREATE DATABASE repro31583;
USE repro31583;
CREATE TABLE p(id BIGINT PRIMARY KEY,v VECF32(2))
PARTITION BY RANGE(id) (
  PARTITION p0 VALUES LESS THAN (100),
  PARTITION p1 VALUES LESS THAN MAXVALUE
);
INSERT INTO p VALUES(1,'[1,1]'),(101,'[2,2]');
ALTER TABLE p ADD INDEX ix USING hnsw(v)
  OP_TYPE 'vector_l2_ops' QUANTIZATION 'float16' MAX_BAD_RECORDS 0;
SHOW WARNINGS;
SHOW CREATE TABLE p;
DROP DATABASE repro31583;

Expected: the valid option is preserved through partition DDL serialization and
the index is created. Actual: 1105, with syntax error ... near " float16 MAX_BAD_RECORDS 0 "; no index appears in SHOW CREATE. The client statement
contains the correct quotes. Repeat with ivfflat, adding LISTS 1, for the same
failure. Both corresponding nonpartitioned ALTER controls succeed.

Impact and implementation evidence

This blocks the ALTER ADD path for quantized CPU vector indexes on partitioned
tables, including the synchronous-build path covered by #31583. There are no bad
rows or exceeded limits in this reproduction. The introduction by the feature
has not been established.

IndexOption.Format writes Quantization with WriteString and no string-literal
quoting. Partition ALTER regenerates/reparses DDL. See option formatting.
This is an implementation explanation consistent with the actual error, not a
claim that a fix has been tested.

Evidence and related issues

Full commands/results/warnings and successful nonpartitioned controls are retained
in local partition-alter-serialization.json. The earlier bad-row ALTER control
was rejected during setup and was excluded from #32881's REINDEX claim.
Local artifacts are not publicly accessible; the complete small reproduction is
included above. Duplicate searches for partition quantization and "float16" "syntax" found no matching report. Related feature #31583; #32881 concerns the
different successful standalone CREATE INDEX path. No fix is included.

Activity

  1. added this to the MO-202611 milestone on Nov 18, 2026
  2. added theissue type on Nov 18, 2026
  3. added
    kind/bug
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions