René's URL Explorer Experiment


Title: get_historical_features raises TypeError on a zero-row entity_df (Dask/file offline store) · Issue #6817 · feast-dev/feast · GitHub

Open Graph Title: get_historical_features raises TypeError on a zero-row entity_df (Dask/file offline store) · Issue #6817 · feast-dev/feast

X Title: get_historical_features raises TypeError on a zero-row entity_df (Dask/file offline store) · Issue #6817 · feast-dev/feast

Description: Expected Behavior get_historical_features with an entity_df that happens to have zero rows should return an empty result with the right columns. A zero-row entity frame is a normal degenerate case in batch scoring — the upstream query si...

Open Graph Description: Expected Behavior get_historical_features with an entity_df that happens to have zero rows should return an empty result with the right columns. A zero-row entity frame is a normal degenerate case ...

X Description: Expected Behavior get_historical_features with an entity_df that happens to have zero rows should return an empty result with the right columns. A zero-row entity frame is a normal degenerate case ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"get_historical_features raises TypeError on a zero-row entity_df (Dask/file offline store)","articleBody":"## Expected Behavior\n\n`get_historical_features` with an `entity_df` that happens to have zero rows should\nreturn an empty result with the right columns. A zero-row entity frame is a normal\ndegenerate case in batch scoring — the upstream query simply matched nothing that run.\n\n## Current Behavior\n\nIt raises an opaque pandas error from deep inside the Dask offline store:\n\n```\nTypeError: Invalid comparison between dtype=datetime64[ns] and DatetimeArray\n```\n\nTraceback tail:\n\n```\n  File \"sdk/python/feast/infra/offline_stores/offline_store.py\", line 178, in to_arrow\n    features_table = self._to_arrow_internal(timeout=timeout)\n  File \"sdk/python/feast/infra/offline_stores/dask.py\", line 103, in _to_arrow_internal\n    df = self.evaluation_function().compute()\n  File \"sdk/python/feast/infra/offline_stores/dask.py\", line 317, in evaluate_historical_retrieval\n    df_to_join = _filter_ttl(\n  File \"sdk/python/feast/infra/offline_stores/dask.py\", line 1206, in _filter_ttl\n    df_to_join = df_to_join.persist()\n```\n\n## Steps to reproduce\n\nIdentical construction, only the row count differs, against a `file` offline store:\n\n```python\ndef mk(n):\n    return pd.DataFrame({\n        \"driver_id\": [1001] * n,\n        \"event_timestamp\": pd.to_datetime([datetime(2026, 2, 1)] * n, utc=True),\n    })\n\nfs.get_historical_features(entity_df=mk(1), features=[\"driver_stats:conv_rate\"]).to_df()\n# OK, shape=(1, 3)\n\nfs.get_historical_features(entity_df=mk(0), features=[\"driver_stats:conv_rate\"]).to_df()\n# TypeError: Invalid comparison between dtype=datetime64[ns] and DatetimeArray\n```\n\n### Specifications\n\n- Version: `master` @ `5ad5592390febfca60c9d88edf7daccbdd156fd6`\n- Platform: Linux x86_64, Python 3.11.15, dask 2026.8.0\n- Subsystem: offline store (Dask / file)\n\n## Possible Solution\n\n`_normalize_timestamp` (`sdk/python/feast/infra/offline_stores/dask.py:1139`) makes\ntimestamp columns tz-aware with a row-wise `apply`:\n\n```python\ndf_to_join[timestamp_field] = df_to_join[timestamp_field].apply(\n    lambda x: x if x.tzinfo else x.replace(tzinfo=timezone.utc),\n    meta=(timestamp_field, \"datetime64[ns, UTC]\"),\n)\n```\n\n`meta` *declares* a tz-aware result, but with zero rows the lambda never runs, so the\ncomputed partition stays `datetime64[ns]`. Declared and actual dtypes then diverge, and\nthe tz-naive vs tz-aware comparison in `_filter_ttl`\n(`sdk/python/feast/infra/offline_stores/dask.py:1183`) raises.\n\nReplacing the row-wise `apply` with a vectorized, empty-safe conversion fixes it and is\nfaster on non-empty frames too: pick `dt.tz_localize(\"UTC\")` for a tz-naive column and\n`dt.tz_convert(\"UTC\")` otherwise, based on the column's declared dtype. That yields the\ncorrect dtype even when the partition is empty.\n\nA regression test covering a zero-row `entity_df` through\n`get_historical_features(...).to_df()` on the Dask store would pin this down; the\ncurrent suite only exercises non-empty entity frames, which is why CI stays green.\n\nHappy to send a PR for this.\n","author":{"url":"https://github.com/Daksha1611","@type":"Person","name":"Daksha1611"},"datePublished":"2026-09-06T18:32:57Z","url":"https://github.com/feast-dev/feast/issues/6817"}

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:71502405-9f7b-70cd-0440-f0ff9479a513
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8F8C:E40BB:E68AB4:13ADE40:6AFE9526
html-safe-nonce65c78633d6655c69f85ac43b0fe9ae4d25fe6905af42afe841eb1b275782ef37
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjhDOkU0MEJCOkU2OEFCNDoxM0FERTQwOjZBRkU5NTI2IiwidmlzaXRvcl9pZCI6Ijg2Njk4NzAzNDc1NTk4MDIxNTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbb6ba2572a257383c9a14f03d20f27bfd7fb3b0e53b21973857eaa3aa1f8a3da
hovercard-subject-tagissue:5366866001
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/6817/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5b18c661e8a40f17f7ce12c9424b9ec08a517fad60dc254aafd9080382cb2e81/feast-dev/feast/issues/6817
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5b18c661e8a40f17f7ce12c9424b9ec08a517fad60dc254aafd9080382cb2e81/feast-dev/feast/issues/6817
og:image:altExpected Behavior get_historical_features with an entity_df that happens to have zero rows should return an empty result with the right columns. A zero-row entity frame is a normal degenerate case ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDaksha1611
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/6817#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fissues%2F6817
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%2F6817
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/6817
Reloadhttps://github.com/feast-dev/feast/issues/6817
Reloadhttps://github.com/feast-dev/feast/issues/6817
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/6817
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6817
#6818https://github.com/feast-dev/feast/pull/6818
get_historical_features raises TypeError on a zero-row entity_df (Dask/file offline store)https://github.com/feast-dev/feast/issues/6817#top
#6818https://github.com/feast-dev/feast/pull/6818
https://github.com/Daksha1611
Daksha1611https://github.com/Daksha1611
on Sep 6, 2026https://github.com/feast-dev/feast/issues/6817#issue-5366866001
Sign up for freehttps://github.com/signup?return_to=https://github.com/feast-dev/feast/issues/6817
Sign in to commenthttps://github.com/login?return_to=https://github.com/feast-dev/feast/issues/6817
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.