Skip to content
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

Time granularities like PT18H or P2D return not floorable #262

Open
akansal1 opened this issue Jan 7, 2019 · 5 comments
Open

Time granularities like PT18H or P2D return not floorable #262

akansal1 opened this issue Jan 7, 2019 · 5 comments
Labels

Comments

@akansal1
Copy link

akansal1 commented Jan 7, 2019

Hi,

We are trying to achieve time granularities like PT18H and P2D but time split return not floorable, is there a reason to keep this limitation or this is a bug ?

thanks

@mkuthan mkuthan added the bug label Jan 9, 2019
@mkuthan
Copy link
Member

mkuthan commented Jan 9, 2019

It looks like a bug, we will investigate the issue soon. Thanks!

@adrianmroz
Copy link
Collaborator

https://github.com/implydata/plywood/blob/master/src/expressions/timeBucketExpression.ts#L47

Plywood requires Duration to be floor able to create TimeBucket. I don't think we can bypass that.

@akansal1
Copy link
Author

Plywood uses chronoshift to this calculation
https://github.com/implydata/chronoshift/blob/master/src/duration/duration.ts#L256

Which is using criteria defined in
https://github.com/implydata/chronoshift/blob/master/src/floor-shift-ceil/floor-shift-ceil.ts

So, in principle making changes in chronoshift logic should work and you will not require to bypass anything in Plywood

@adrianmroz
Copy link
Collaborator

This library is also not in our control. Maybe we should create ticket in plywood repo? Chronoshift is also supported by them.

@adrianmroz
Copy link
Collaborator

Let's see what happens: implydata/plywood#180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants