You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the existing issues. Searches for MockCompilerContext/primary key and mock/composite key found no matching report.
Branch Name
main; reproduced in the local #29629 worktree during #29249 fixture QA.
Commit ID
ce2a22a contains the same defective composite-key construction. Runtime reproduction uses d6b921d plus the explicit-owner migration and an independent regression.
Other Environment Information
Go 1.26.4, local Linux; GOMAXPROCS=2, serialized Go package tests. No database/server or large data is needed.
Actual Behavior
The planner mock constructs composite primary-key Names by allocating a length-N slice and then appending N names. Resolving tpch.lineitem returns ["", "", "l_orderkey", "l_linenumber"], rather than the two declared keys. The scalar nation control passes. A focused regression fails at the exact Names equality assertion before the fix.
Expected Behavior
The mock metadata supplied to real planner consumers contains exactly the declared primary-key names in declaration order. The lineitem key includes nonadjacent source columns 0 and 3.
Fix at the existing schema-to-TableDef owner by filling the preallocated Names slice, rather than adding an alternate metadata path. Also retire mock computation/filling of PrimaryKeyDef.Cols: proto/plan.proto explicitly marks it currently unused, DeepCopyPrimaryKeyDef does not preserve it, and repository-wide consumer search finds no runtime reader. This report concerns test-fixture metadata quality; no production data corruption or quantified query slowdown is claimed. Consolidate the fix and regression into #29629 under #29249 / #29627.
Activity
refactor(test): make planner fixture ownership explicit (#29638)