Skip to content

fix:Add support for TimeDelta type in Python and Rust #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Keerthi421
Copy link

PR Description:
Issue #344
This PR implements support for the TimeDelta type in CocoIndex as requested in issue #344.

Changes:
-->Added TimeDelta = Annotated[datetime.timedelta, TypeKind('TimeDelta')] in Python typing module
-->Added TimeDelta variant to Rust's type system
-->Implemented conversion between Python's datetime.timedelta and Rust's chrono::Duration
-->Added PostgreSQL storage support using the native interval type

Testing:
-->Tests should be added to verify:
-->Python type analysis correctly identifies datetime.timedelta objects
-->Conversion between Python and Rust time delta representations works correctly
-->PostgreSQL storage and retrieval works as expected
This addresses #344.

Copy link
Member

@badmonster0 badmonster0 left a comment

Choose a reason for hiding this comment

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

Thanks for making this PR!

This PR fails to build:

https://github.com/cocoindex-io/cocoindex/actions/runs/14589192202/job/40959965493?pr=368

You can follow this guide to build and test it locally:

https://cocoindex.io/docs/about/contributing

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.

None yet

2 participants