René's URL Explorer Experiment


Title: `__eq__` raises TypeError on cross-type comparison instead of returning NotImplemented · Issue #6636 · feast-dev/feast · GitHub

Open Graph Title: `__eq__` raises TypeError on cross-type comparison instead of returning NotImplemented · Issue #6636 · feast-dev/feast

X Title: `__eq__` raises TypeError on cross-type comparison instead of returning NotImplemented · Issue #6636 · feast-dev/feast

Description: Expected Behavior Comparing two Feast objects of different concrete types (e.g. FileSource vs SnowflakeSource) returns False, per Python's data model. In particular, changing a feature view's data source type and re-running feast apply o...

Open Graph Description: Expected Behavior Comparing two Feast objects of different concrete types (e.g. FileSource vs SnowflakeSource) returns False, per Python's data model. In particular, changing a feature view's data ...

X Description: Expected Behavior Comparing two Feast objects of different concrete types (e.g. FileSource vs SnowflakeSource) returns False, per Python's data model. In particular, changing a feature view'...

Opengraph URL: https://github.com/feast-dev/feast/issues/6636

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`__eq__` raises TypeError on cross-type comparison instead of returning NotImplemented","articleBody":"## Expected Behavior\n\nComparing two Feast objects of different concrete types (e.g. `FileSource` vs `SnowflakeSource`)\nreturns `False`, per Python's data model. In particular, changing a feature view's data source\ntype and re-running `feast apply` over an existing registry succeeds.\n\n## Current Behavior\n\n`__eq__` raises `TypeError` on a cross-type comparison instead of returning `False`. Because the\napply/diff path compares registered objects against incoming ones, changing a source type and\nre-applying crashes:\n\n```\nTypeError: Comparisons should only involve FileSource class objects.\n```\n\nMinimal repro:\n\n```python\nfrom feast import FileSource\nfrom feast.infra.offline_stores.snowflake_source import SnowflakeSource\na = FileSource(name=\"x\", path=\"/tmp/x.parquet\", timestamp_field=\"ts\")\nb = SnowflakeSource(name=\"x\", database=\"D\", schema=\"S\", table=\"T\", timestamp_field=\"ts\")\na == b   # TypeError — should be False\n```\n\nRoot cause: the affected `__eq__` methods do\n`if not isinstance(other, X): raise TypeError(\"Comparisons should only involve X class objects.\")`.\nPython's data model requires `__eq__` to return `NotImplemented` for an unrecognized operand (so\nthe interpreter can try the reflected op and fall back to identity → `False`), never raise.\n\nThis is **systemic** — the pattern appears in ~35 `__eq__` methods across the object model:\n`DataSource` and its `Kafka`/`Request`/`Kinesis` subclasses; all offline sources (`file`,\n`snowflake`, `bigquery`, `redshift`, and the `ray`/`couchbase`/`trino`/`oracle`/`athena`/`mssql`/\n`postgres` contrib sources); plus `Entity`, `FeatureView`, `BaseFeatureView`, `OnDemandFeatureView`,\n`StreamFeatureView`, `FeatureService`, `SavedDataset`, `Project`, `ProjectMetadata`, the four\n`transformation/*` classes, `Aggregation`, `LabelView`, `Permission`, and the `RoleBasedPolicy` /\n`GroupBasedPolicy` / `NamespaceBasedPolicy` / `CombinedGroupNamespacePolicy` policies.\n`PushSource.__eq__` already does the right thing (`return False`), so the correct pattern is\nalready in-tree.\n\n## Steps to reproduce\n\nRun the snippet above, or: define a feature view on a `FileSource` and `feast apply`; change that\nfeature view's source to a `SnowflakeSource` (same name) and `feast apply` again → crash.\n\n### Specifications\n\n- Version: 0.64.0 and 0.65.0 / master (verified; pattern unchanged)\n- Subsystem: core object model (`sdk/python/feast`)\n\n## Possible Solution\n\nReplace each `raise TypeError(\"Comparisons should only involve …\")` in these `__eq__` methods with\n`return False`, matching `PushSource.__eq__`, which already handles a cross-type comparison this\nway. `PushSource` is the one `__eq__` that does this correctly today, and there is no\n`return NotImplemented` anywhere in the codebase, so `return False` keeps a single consistent\nconvention rather than introducing a new one. (`NotImplemented` would be the stricter data-model\nanswer and would also let a reflected/matcher `__eq__` participate, but the codebase already\nforgoes that everywhere.)\n\nAdd a unit test asserting cross-type equality returns `False` (not a raise). This can be one sweep\nacross all 35 sites (uniform and mechanical) or scoped to the `DataSource` hierarchy (where the\ncrash reproduces) with a follow-up for the rest — happy to do whichever the maintainers prefer.\nPR incoming.\n","author":{"url":"https://github.com/larrysingleton007","@type":"Person","name":"larrysingleton007"},"datePublished":"2026-07-23T14:31:03Z","url":"https://github.com/feast-dev/feast/issues/6636"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:26f5c2c4-4f35-67af-1d55-0ff9ab5cf9a5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD702:288779:2D439A:3E7C99:6AFE981C
html-safe-nonce4b7f45fcfd38f273c4a0aa80ac929fb6bca8331bfbb9076fa3e1d7db0794ac95
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzAyOjI4ODc3OToyRDQzOUE6M0U3Qzk5OjZBRkU5ODFDIiwidmlzaXRvcl9pZCI6IjE5ODI1MDE4NjEzMjc4MDQ0NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0da625bd538e5804a47cadcf89a9a3df44a2be69fe718e500f37ae23d3823b29
hovercard-subject-tagissue:4959857523
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/6636/issue_layout
twitter:imagehttps://opengraph.githubassets.com/543c1227f5d7e81270cdda896b1240cdb18c343517d70b9885fc8c5820ac4dd2/feast-dev/feast/issues/6636
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/543c1227f5d7e81270cdda896b1240cdb18c343517d70b9885fc8c5820ac4dd2/feast-dev/feast/issues/6636
og:image:altExpected Behavior Comparing two Feast objects of different concrete types (e.g. FileSource vs SnowflakeSource) returns False, per Python's data model. In particular, changing a feature view's data ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelarrysingleton007
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/feast-dev/feast/issues/6636#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6636
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6636
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/issues/6636
Reloadhttps://github.com/feast-dev/feast/issues/6636
Reloadhttps://github.com/feast-dev/feast/issues/6636
feast-devhttps://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Codehttps://github.com/feast-dev/feast
Issues223 (223)https://github.com/feast-dev/feast/issues
Pull requests143 (143)https://github.com/feast-dev/feast/pulls
Discussionshttps://github.com/feast-dev/feast/discussions
Actionshttps://github.com/feast-dev/feast/actions
Security and quality1 (1)https://github.com/feast-dev/feast/security
Insightshttps://github.com/feast-dev/feast/insights
https://github.com/feast-dev/feast
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6636
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6636
#6637https://github.com/feast-dev/feast/pull/6637
__eq__ raises TypeError on cross-type comparison instead of returning NotImplementedhttps://github.com/feast-dev/feast/issues/6636#top
#6637https://github.com/feast-dev/feast/pull/6637
https://github.com/larrysingleton007
larrysingleton007https://github.com/larrysingleton007
on Jul 23, 2026https://github.com/feast-dev/feast/issues/6636#issue-4959857523
https://github.com/ShumzZzZz
ShumzZzZzhttps://github.com/ShumzZzZz
on Jul 28, 2026https://github.com/feast-dev/feast/issues/6636#issuecomment-5109861183
larrysingleton007https://github.com/larrysingleton007
on Jul 28, 2026https://github.com/feast-dev/feast/issues/6636#event-28628308819
fix: Guard SparkSource, Feature, and data format __eq__ against cross…https://github.com/larrysingleton007/feast/commit/7e226c479b29aa98dca8cd20715c53562bc43f5e
7e226c4https://github.com/larrysingleton007/feast/commit/7e226c479b29aa98dca8cd20715c53562bc43f5e
https://github.com/larrysingleton007
larrysingleton007https://github.com/larrysingleton007
on Jul 28, 2026https://github.com/feast-dev/feast/issues/6636#issuecomment-5110842261
@ShumzZzZzhttps://github.com/ShumzZzZz
https://github.com/larrysingleton007
larrysingleton007https://github.com/larrysingleton007
on Jul 28, 2026https://github.com/feast-dev/feast/issues/6636#issuecomment-5110889669
@ntkatholehttps://github.com/ntkathole
@franciscojavierarceohttps://github.com/franciscojavierarceo
@jyejarehttps://github.com/jyejare
@aniketpaluhttps://github.com/aniketpalu
#6637https://github.com/feast-dev/feast/pull/6637
ntkatholehttps://github.com/ntkathole
on Jul 29, 2026https://github.com/feast-dev/feast/issues/6636#event-28634519964
fix: Guard SparkSource, Feature, and data format __eq__ against cross…https://github.com/larrysingleton007/feast/commit/1af5c885725c7071c2abe55ae5f8135d886f47b5
1af5c88https://github.com/larrysingleton007/feast/commit/1af5c885725c7071c2abe55ae5f8135d886f47b5
fix: Guard SparkSource, Feature, and data format __eq__ against cross…https://github.com/larrysingleton007/feast/commit/d2fc30ba3112258c460863ba6f1ca0f9f549f00c
d2fc30bhttps://github.com/larrysingleton007/feast/commit/d2fc30ba3112258c460863ba6f1ca0f9f549f00c
fix: Return False from __eq__ on cross-type comparison (#6637)https://github.com/feast-dev/feast/commit/0f149a99bc30f4b792b34b46089547feee3a72a0
#6637https://github.com/feast-dev/feast/pull/6637
0f149a9https://github.com/feast-dev/feast/commit/0f149a99bc30f4b792b34b46089547feee3a72a0
ntkatholehttps://github.com/ntkathole
completedhttps://github.com/feast-dev/feast/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#6637https://github.com/feast-dev/feast/pull/6637
on Jul 30, 2026https://github.com/feast-dev/feast/issues/6636#event-28703305159
franciscojavierarceohttps://github.com/franciscojavierarceo
on Aug 21, 2026https://github.com/feast-dev/feast/issues/6636#event-29781434613
chore(release): release 0.66.0https://github.com/feast-dev/feast/commit/1d5be950cf718a674cb01eaf0fd0ad6f0a4c6335
1d5be95https://github.com/feast-dev/feast/commit/1d5be950cf718a674cb01eaf0fd0ad6f0a4c6335
Michie-hubhttps://github.com/Michie-hub
on Aug 31, 2026https://github.com/feast-dev/feast/issues/6636#event-30282807598
chore(release): release 0.66.0https://github.com/Michie-hub/feast/commit/a29c9231976fd7c68e51570047f9517f06579041
a29c923https://github.com/Michie-hub/feast/commit/a29c9231976fd7c68e51570047f9517f06579041
Sign up for freehttps://github.com/signup?return_to=https://github.com/feast-dev/feast/issues/6636
Sign in to commenthttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6636
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.