Description
The function date_diff_str() returns null when the part is 'month':
select date_diff_str('2015-12-22T20:02:48.407Z',clock_str(), 'month');
"$1": null
Other parts (e.g. 'hour') return correctly:
select date_diff_str('2015-12-22T20:02:48.407Z',clock_str(), 'hour');
"$1": 2168
Date diff processing may need to have a case for 'month':
https://github.com/couchbase/query/blob/master/expression/func_date.go#L1989
Also 'quarter'
Attachments
For Gerrit Dashboard: MB-16334 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
56763,7 | MB-16334 : Fix to include month and quarter parts to date functions | master | query | Status: MERGED | +2 | +1 |
56843,1 | MB-16334 : Fix to include month and quarter parts to date functions | master | query | Status: ABANDONED | 0 | 0 |
57050,2 | MB-16334 : Fix to include month and quarter parts to date functions | 4.1.0 | query | Status: MERGED | +2 | +1 |