Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

What this PR does / why we need it:

Adds Set as a feature type to store collections of unique values, eliminating the need to manually deduplicate lists or convert back from maps.

Changes

  • Protobuf: Added 8 SET type variants (INT32_SET, INT64_SET, STRING_SET, BYTES_SET, BOOL_SET, FLOAT_SET, DOUBLE_SET, UNIX_TIMESTAMP_SET) with corresponding message types. Compiled with protobuf version 4.25.0 to maintain version consistency with the existing codebase.
  • Python SDK:
    • New Set class in types.py following the same pattern as Array
    • Bidirectional type conversions in type_map.py with automatic deduplication
    • Added SetType union and enum values in value_type.py
  • Tests: Unit tests for type creation, round-trip conversions, and duplicate removal
  • Docs: Updated type-system.md with set types table and usage examples

Usage

from feast.types import Set, String, Int32
from feast import Field

# Sets automatically deduplicate
Field(name="visited_pages", dtype=Set(String))
Field(name="unique_categories", dtype=Set(Int32))

# Input: {1, 2, 3, 2, 1} → Stored: {1, 2, 3}

All primitive types except Map support set variants.

Misc

Protobuf changes are backward compatible. Existing LIST and MAP types are unaffected. Generated protobuf files maintain version 4.25.0 compatibility without introducing breaking changes from newer protobuf versions.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add set as feature type</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
Support for set features as feast feature types is missing.

Describe the solution you'd like
Add support for set type features in feast.

Describe alternatives you've considered
We have considered storing set features as list or maps but then burden is on calling client to covert back.
</issue_description>

<agent_instructions>please add this to the feast types and update the docs</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 22, 2026 01:57
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for set as feature type in feast feat: Add Set as feature type Jan 22, 2026
Copy link
Member

@franciscojavierarceo franciscojavierarceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot we should not update the protobuf version

Co-authored-by: franciscojavierarceo <4163062+franciscojavierarceo@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 22, 2026

@copilot we should not update the protobuf version

Fixed! Reverted all generated protobuf files and recompiled with protobuf version 4.25.0 instead of 6.31.1. The set types are now properly generated without updating the protobuf version. See commit e11795d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add set as feature type

2 participants