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
refactor: Replace combinatorial nested collection enums with recursive VALUE_LIST/VALUE_SET
Replace 4 combinatorial enum values (LIST_LIST=36, LIST_SET=37, SET_LIST=38,
SET_SET=39) with 2 recursive enum values (VALUE_LIST=40, VALUE_SET=41) that
use RepeatedValue to enable unlimited nesting depth. This is a breaking change
for an unreleased feature, as suggested in PR feast-dev#6132 review.
Key changes:
- Proto: Remove 4 enum/oneof fields, add VALUE_LIST/VALUE_SET with reserved 36-39
- Python: Update ValueType enum, type system, serialization, field persistence
- JSON: Update proto_json encode/decode for new field names
- Tests: Rewrite all nested collection tests (204 tests passing)
- Docs: Update type-system.md for recursive design
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: soojin <soojin@dable.io>
Copy file name to clipboardExpand all lines: docs/reference/type-system.md
+14-17Lines changed: 14 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,21 +88,21 @@ All primitive types (except `Map` and `Json`) have corresponding set types for s
88
88
89
89
### Nested Collection Types
90
90
91
-
Feast supports 2-level nested collections, combining Array and Set types:
91
+
Feast supports arbitrarily nested collections using a recursive `VALUE_LIST` / `VALUE_SET` design. The outer container determines the proto enum (`VALUE_LIST` for `Array(…)`, `VALUE_SET` for `Set(…)`), while the full inner type structure is persisted via a mandatory `feast:nested_inner_type` Field tag.
92
92
93
93
| Feast Type | Python Type | ValueType | Description |
Where `T` is any supported primitive type (Int32, Int64, Float32, Float64, String, Bytes, Bool, UnixTimestamp).
101
+
Where `T` is any supported primitive type (Int32, Int64, Float32, Float64, String, Bytes, Bool, UnixTimestamp) or another nested collection type.
101
102
102
103
**Notes:**
103
-
- Nesting is limited to 2 levels. `Array(Array(Array(T)))` will raise a `ValueError`.
104
-
- Inner type information is preserved via Field tags (`feast:nested_inner_type`) and restored during deserialization.
105
-
- For `Array(Set(T))` and `Set(Set(T))`, inner collection elements are automatically deduplicated.
104
+
- Nesting depth is **unlimited**. `Array(Array(Array(T)))`, `Set(Array(Set(T)))`, etc. are all supported.
105
+
- Inner type information is preserved via Field tags (`feast:nested_inner_type`) and restored during deserialization. This tag is mandatory for nested collection types.
106
106
- Empty inner collections (`[]`) are stored as empty proto values and round-trip as `None`. For example, `[[1, 2], [], [3]]` becomes `[[1, 2], None, [3]]` after a write-read cycle.
0 commit comments