Skip to content

Commit 40409d6

Browse files
authored
chore: move deprecated fields to bottom in Field msg (#5211)
In the `Field` message, there are several fields that are deprecated or no longer apply in V2 file format. I'm moving them to the bottom of the message so they aren't distracting.
1 parent 731871f commit 40409d6

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

protos/file.proto

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,26 +161,35 @@ message Field {
161161
// If this field is nullable.
162162
bool nullable = 6;
163163

164+
// optional field metadata (e.g. extension type name/parameters)
165+
map<string, bytes> metadata = 10;
166+
167+
bool unenforced_primary_key = 12;
168+
169+
// DEPRECATED ----------------------------------------------------------------
170+
171+
// Deprecated: Only used in V1 file format. V2 uses variable encodings defined
172+
// per page.
173+
//
174+
// The global encoding to use for this field.
164175
Encoding encoding = 7;
165176

166-
/// The file offset for storing the dictionary value.
167-
/// It is only valid if encoding is DICTIONARY.
168-
///
169-
/// The logic type presents the value type of the column, i.e., string value.
177+
// Deprecated: Only used in V1 file format. V2 dynamically chooses when to
178+
// do dictionary encoding and keeps the dictionary in the data files.
179+
//
180+
// The file offset for storing the dictionary value.
181+
// It is only valid if encoding is DICTIONARY.
182+
//
183+
// The logic type presents the value type of the column, i.e., string value.
170184
Dictionary dictionary = 8;
171185

172186
// Deprecated: optional extension type name, use metadata field
173187
// ARROW:extension:name
174188
string extension_name = 9;
175189

176-
// optional field metadata (e.g. extension type name/parameters)
177-
map<string, bytes> metadata = 10;
178-
179190
// Field number 11 was previously `string storage_class`.
180191
// Keep it reserved so older manifests remain compatible while new writers
181192
// avoid reusing the slot.
182193
reserved 11;
183194
reserved "storage_class";
184-
185-
bool unenforced_primary_key = 12;
186195
}

0 commit comments

Comments
 (0)