cube-js / cube-js/cube

inDateRange with only one date not working as expected

Open
#3,111 4 comments 1 reaction 1 assignee Claimed by @paveltiunov View on GitHub
api:rest help wanted
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
As stated in the documentation ([operator inDateRange](https://cube.dev/docs/query-format#filters-operators-in-date-range)) _"If only one date specified the filter would be set exactly to this date"_.
Instead, it seems to consider the only date provided as a lower bound.

**To Reproduce**
```
{
member: "Posts.time",
operator: "inDateRange",
values: ['2015-01-01']
}
```

**Expected behavior**
Same as
```
{
member: "Posts.time",
operator: "inDateRange",
values: ['2015-01-01', '2015-01-01']
}
```
or
```
{
member: "Posts.time",
operator: "equals",
values: ['2015-01-01']
}
```

**Version:**
0.26.77

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.