cube-js/cube

inDateRange with only one date not working as expected

Open

#3111 aperta il 15 lug 2021

Vedi su GitHub
 (4 commenti) (1 reazione) (1 assegnatario)Rust (1965 fork)batch import
api:resthelp wanted

Metriche repository

Star
 (19.563 star)
Metriche merge PR
 (Merge medio 5g 16h) (138 PR mergiate in 30 g)

Descrizione

Describe the bug As stated in the documentation (operator inDateRange) "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

Guida contributor