Skip to content

Commit 5164e00

Browse files
committed
docs(contributor-guide): document proto3 enum naming convention
1 parent 9136495 commit 5164e00

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎docs/source/contributor-guide/development.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ and follow the conventions already in use:
9191
- Use `optional` for fields whose unset-ness must survive the boundary
9292
(so the Rust side can leave a DataFusion default in place).
9393
- Use proto enums for closed sets of choices instead of strings.
94+
Prefix every value with the enum's name (e.g.
95+
`FILE_COMPRESSION_TYPE_GZIP`, not bare `GZIP`) because proto3 enum
96+
values are scoped at the package level, and the zero value must be a
97+
`_UNSPECIFIED` sentinel — the Rust side should reject `UNSPECIFIED`
98+
rather than silently default it.
9499
- Keep large opaque payloads (Arrow IPC schemas, plan nodes) as separate
95100
`byte[]` JNI arguments next to the options proto, not inside it.
96101
- Suffix the message name with `Proto` if a sibling Java class would

0 commit comments

Comments
 (0)