Repository navigation
Conversation
StreamFeatureView.__eq__ returned early when neither view had a udf, so mode, timestamp_field, udf_string and aggregations were never compared for UDF-less stream feature views, and enable_tiling / tiling_hop_size were not compared at all. The SQL registry relies on this equality to skip unchanged writes and to detect version pin conflicts. Compare these fields regardless of the udf, normalizing mode and udf_string the way to_proto() writes them so that a view still equals its from_proto(to_proto()) round trip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Vidit Patankar <vidit.patankar16@gmail.com>
This was referenced Oct 18, 2026
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7034 +/- ##
==========================================
+ Coverage 50.98% 51.00% +0.01%
==========================================
Files 455 455
Lines 56964 56964
Branches 8313 8313
==========================================
+ Hits 29044 29054 +10
+ Misses 25935 25927 -8
+ Partials 1985 1983 -2
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Exercise the cases where only one view has a udf and where both have different udfs, which were not covered by the UDF-less equality test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Vidit Patankar <vidit.patankar16@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
StreamFeatureView.__eq__returns early when neither view has audf:so for UDF-less stream feature views (the common case for aggregation-only views)
mode,timestamp_field,udf_stringandaggregationsare never compared.enable_tilingandtiling_hop_sizeare not compared at all, although both are serialized to the proto. As a result, two stream feature views with different aggregations compare equal:The SQL registry relies on this equality:
_apply_objectskips the write whenexisting_obj == obj, andapply_feature_viewuses!=to raiseFeatureViewPinConflictwhen a pinned version is combined with a modified definition. On current master those paths happen to still work, because the registry copy of a stream feature view lists the join key infeatures(fixed in #7033) and that difference makesFeatureView.__eq__return False. With #7033 applied and without this change, I reproduced end to end with a SQLite-backed SQL registry that:aggregationschanged fromsum/1h tomax/7d is silently skipped (the registry keepssum/1h), andversion="v0"while also changing the aggregations does not raiseFeatureViewPinConflict.So this should land before (or together with) #7033.
The fix compares these fields regardless of whether a UDF is set, and adds
enable_tilingandtiling_hop_size.modeandudf_stringare compared in normalized form (mode_to_string(...), andNonetreated as""), matching howto_proto()writes them. Otherwise a view and itsfrom_proto(to_proto(...))copy would compare unequal, which would make every apply look like a change and create extra version snapshots.Which issue(s) this PR fixes:
No existing issue; found while working on #7033. I searched open and closed issues and PRs for a duplicate.
Checks
git commit -s)Testing Strategy
test_stream_feature_view_equality_with_udfcovers the UDF branches (only one view has a udf, or both have different udfs). New parametrized testtest_stream_feature_view_equality_without_udf(aggregations, mode, timestamp_field, enable_tiling, tiling_hop_size): all 5 cases fail on master and pass with this change; the existing round-trip testtest_stream_feature_view_initialization_with_optional_fields_omittedstill passes thanks to the normalization above. Manual end-to-end check with a SQLite-backed SQL registry, both with and without #7033 applied: changed aggregations are written, the pin conflict is raised, and re-applying an unchanged view twice creates no new version snapshot.ruff check,ruff format --checkandmypy feastpass.Misc
Developed with Claude Code (AI) on my behalf.
🤖 Generated with Claude Code