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

Use of Interval Argument Being Allowed for Expand Operator #30

Open
JSRankins opened this issue Jan 29, 2020 · 5 comments
Open

Use of Interval Argument Being Allowed for Expand Operator #30

JSRankins opened this issue Jan 29, 2020 · 5 comments

Comments

@JSRankins
Copy link

The following is not receiving an error:

expand Interval[@2012-02-01, @2012-02-28] per day

However, CQL signature for Expand requires a list of intervals.

@brynrhodes
Copy link
Contributor

@JSRankins , my guess is that the translator running in this environment is allowing for list promotion, and it's automatically promoting the list to an interval. We should consider exposing the translator configuration options in the UI so users can control that behavior.

@JSRankins
Copy link
Author

JSRankins commented Jan 29, 2020

@brynrhodes I like the idea of giving users control. However, it seems odd to me that CQL would encourage casting a single Interval to a list for the expand operator. For example:

expand { Interval[@2018-01-01, @2018-01-04] } per day

expand { Interval[@2018-01-01, @2018-01-04] } per 2 days

Maybe the operator could be overloaded in CQL and allow for expanding intervals outside of lists.

expand(argument Interval, per Quantity) List<Interval>

Thoughts?

@brynrhodes
Copy link
Contributor

@JSRankins , that's a great point, and now that you mention it, I've already used it that way myself. Do you want to submit an STU comment to add that overload?

@JSRankins
Copy link
Author

@brynrhodes Sure.

@JSRankins
Copy link
Author

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

No branches or pull requests

2 participants