sql/types: remove VisibleType field and NAME downgrade logic#164412
sql/types: remove VisibleType field and NAME downgrade logic#164412trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
|
😎 Merged successfully - details. |
|
It looks like your PR touches SQL parser code but doesn't add or edit parser tests. Please make sure you add or edit parser tests if you edit the parser. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
3272317 to
7e49444
Compare
|
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. It looks like your PR touches SQL parser code but doesn't add or edit parser tests. Please make sure you add or edit parser tests if you edit the parser. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
7e49444 to
32944c0
Compare
The `VisibleType` field in the `InternalType` protobuf was a pre-19.1 mechanism for encoding type aliases (INT4, FLOAT4, VARCHAR, etc.). It was superseded by the `Oid` field in 19.2 but kept for backward compatibility during mixed-version clusters. Now that `MinSupported` is v25.4, no mixed-version cluster will include a node older than v25.4, which already populates the `Oid` field. This commit removes: - The `VisibleType` field from the proto (replaced with `reserved 6`) - All `visible*` constants and VisibleType assignments in canonical types, constructors, and the SQL parser - The VisibleType-based OID inference in `upgradeType()`, keeping only Width-based inference for old backup compatibility - The `downgradeType()` function and NAME serialization special-casing in Marshal/MarshalTo/MarshalToSizedBuffer/Size/MarshalJSONPB - The VisibleType reconstruction logic in UnmarshalJSONPB - The `duringUpgradeTo25_4` forced descriptor rewrite in the first upgrade migration - Related test infrastructure (VisibleType comparison filters, old format test cases) Resolves: cockroachdb#152629 Release note: None Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
32944c0 to
a2e89c7
Compare
spilchen
left a comment
There was a problem hiding this comment.
nice to cleanup this tech debt
@spilchen reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on mw5h).
|
/trunk merge tftr! |
The
VisibleTypefield in theInternalTypeprotobuf was a pre-19.1 mechanism for encoding type aliases (INT4, FLOAT4, VARCHAR, etc.). It was superseded by theOidfield in 19.2 but kept for backward compatibility during mixed-version clusters.Now that
MinSupportedis v25.4, no mixed-version cluster will include a node older than v25.4, which already populates theOidfield. This commit removes:VisibleTypefield from the proto (replaced withreserved 6)visible*constants and VisibleType assignments in canonical types, constructors, and the SQL parserupgradeType(), keeping only Width-based inference for old backup compatibilitydowngradeType()function and NAME serialization special-casing in Marshal/MarshalTo/MarshalToSizedBuffer/Size/MarshalJSONPBduringUpgradeTo25_4forced descriptor rewrite in the first upgrade migrationResolves: #152629
Release note: None