-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add timestamp precision support in Parser #171
Conversation
6e23679
to
212be52
Compare
Here is a working example for the parser support: https://gist.github.com/wamsiv/49e17917742c2e8d581806f98e591987 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should make sure we note somewhere that nanosecond support is still in progress.
pymapd/_utils.py
Outdated
return base + datetime.timedelta(seconds=epoch) | ||
elif precision == 3: | ||
modulus = epoch % 1000 | ||
seconds = epoch / 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use divmod()
here to get both at the same time, though would have to see if the numbers we're working with are large enough for that to be faster than the current method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
divmod()
is working well with large numbers, I have used it in code. Thanks!
Added a note in docs regarding WIP timestamp nanosecond support in pymapd. |
fixes #170