Skip to content

Conversation

@ArtemioPadilla
Copy link

Summary

Add support for multiple join keys in Feast entities, resolving the long-standing limitation that prevented entities from having more than one join key.

Fixes the error: ValueError: An entity may only have a single join key. Multiple join keys will be supported in the future.

Changes Made

  • Protobuf Schema: Added join_keys field to Entity protobuf with backward compatibility
  • Python SDK: Updated Entity class to support multiple join keys with deprecation warnings for legacy single join key
  • Go Implementation: Added multiple join keys support to Go Entity model with backward compatibility
  • Comprehensive Tests: Added full test coverage for multiple join keys functionality and backward compatibility
  • Usage Examples: Added practical examples demonstrating the new functionality

Backward Compatibility

  • ✅ Maintains full backward compatibility with existing single join key entities
  • ✅ Deprecation warnings guide users to migrate to new join_keys field
  • ✅ All existing code continues to work unchanged

Testing

  • All existing tests pass
  • New comprehensive test suite validates multiple join keys functionality
  • Backward compatibility tests ensure legacy code works
  • Integration tests verify protobuf serialization/deserialization

@ArtemioPadilla ArtemioPadilla requested a review from a team as a code owner December 2, 2025 03:38
   - Add repeated string join_keys field to EntitySpecV2
   - Add deprecation notice to existing join_key field
   - Maintain backward compatibility with existing protobuf messages

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
- Add join_keys List[str] attribute to Entity class
- Implement backward-compatible join_key property with deprecation warning
- Update __hash__, __eq__, __repr__ methods for multiple keys
- Enhance to_proto() and from_proto() methods for dual compatibility

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
- Update feature_store.py to collect all join keys from entities
- Update utils.py join key collection for feature view operations
- Maintain backward compatibility in entity mappings
- Enhance protobuf conversion for multiple join keys

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
- Update Entity struct with JoinKeys []string field
- Add backward-compatible JoinKey() method
- Update NewEntityFromProto() with proper fallback logic
- Fix direct field access in serving.go

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
   - Add tests for multiple join keys creation
    and access
   - Add deprecation warning tests for
   property access and protobuf
   - Add backward compatibility validation
   tests
   - Add protobuf
   serialization/deserialization tests
   - Verify hash and equality operations with
   multiple keys

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
- Create practical code examples demonstrating new functionality
- Show backward compatibility patterns
- Demonstrate migration from legacy code
- Include best practices and common use cases

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
- Regenerate Python protobuf files after rebase
- Update Entity protobuf bindings with new join_keys field
- Ensure compatibility with upstream codebase changes

Signed-off-by: Artemio Padilla <[email protected]>
Signed-off-by: Artemio Padilla <[email protected]>
@ArtemioPadilla ArtemioPadilla force-pushed the feat/multiple-join-keys-support branch from 1dca667 to 2bb77cd Compare December 2, 2025 03:40
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.

2 participants