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

timedelta improvements #1382

Merged
merged 5 commits into from Jan 26, 2016

Conversation

Projects
None yet
2 participants
@llllllllll
Member

llllllllll commented Jan 12, 2016

depends on: blaze/odo#394 (merged) and blaze/datashape#207 (merged)

This adds:

  • datetime - datetime :: timedelta
  • datetime - timedelta :: datetime
  • datetime + timedelta :: datetime
  • support for those cases where lhs, rhs, or both are optional
  • reductions over timedelta are of type timedelta not float
  • adds std and var to timedelta in pandas and sql. This requires coercing to int to do the reduction then coercing back because neither pandas or postgres support this nativly.
  • corrected datetime subtraction coercing in postgres. Done at expression time with optimize

When we are ready to update the type checking for operators these tests will help a lot. I hope that soon we can have some type of datashape based registration / type checking like:

@typecheck('(Integral, Integral) -> Integral')
@typecheck('(datetime, timedelta) -> timedelta')
class add(Arithmetic):
    pass

@llllllllll llllllllll force-pushed the quantopian:datetime-minus-datetime branch from 94980ec to 6642e8e Jan 12, 2016

@llllllllll llllllllll changed the title from BUG: fix datetime - datetime type to timedelta improvements Jan 12, 2016

@llllllllll llllllllll force-pushed the quantopian:datetime-minus-datetime branch 3 times, most recently from 887b241 to fad81af Jan 12, 2016

@kwmsmith kwmsmith added this to the 0.10 milestone Jan 14, 2016

@llllllllll llllllllll force-pushed the quantopian:datetime-minus-datetime branch from fad81af to 665cd6c Jan 19, 2016

@llllllllll llllllllll force-pushed the quantopian:datetime-minus-datetime branch from 665cd6c to 8f93184 Jan 25, 2016

@llllllllll

This comment has been minimized.

Member

llllllllll commented Jan 25, 2016

@kwmsmith Any comments on this?

@kwmsmith

This comment has been minimized.

Member

kwmsmith commented Jan 25, 2016

@llllllllll sorry for the delay, getting through other backlogs.

Overall LGTM, thanks for fixing.

I'll be putting more time in on other PR and issue review to catch up.

llllllllll added a commit that referenced this pull request Jan 26, 2016

@llllllllll llllllllll merged commit 3aa1718 into blaze:master Jan 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@llllllllll llllllllll deleted the quantopian:datetime-minus-datetime branch Jan 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment