Skip to content

Commit 5607b80

Browse files
committed
sql/sem/types: more efficiently order UserDefinedTypeMetadata fields
The order of fields of the `types.UserDefinedTypedMetadata` struct, which is embedded in `types.T`, has been changed to reduce padding required for word-alignment. The struct size has been reduced from 32 bytes to 24 bytes. Release note: None
1 parent e85c353 commit 5607b80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/sql/types/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ type UserDefinedTypeMetadata struct {
192192
// Name is the resolved name of this type.
193193
Name *UserDefinedTypeName
194194

195+
// EnumData is non-nil iff the metadata is for an ENUM type.
196+
EnumData *EnumMetadata
197+
195198
// Version is the descriptor version of the descriptor used to construct
196199
// this version of the type metadata.
197200
Version uint32
198201

199-
// EnumData is non-nil iff the metadata is for an ENUM type.
200-
EnumData *EnumMetadata
201-
202202
// ImplicitRecordType is true if the metadata is for an implicit record type
203203
// for a table. Note: this can be deleted if we migrate implicit record types
204204
// to ordinary persisted composite types.

0 commit comments

Comments
 (0)