Histogram and calendar_interval

I have sql with histogram and interval
now after upgrade to 7.x it complains that it will be deprecated.

select histogram(status_achieved, INTERVAL 1 day) as d

but when I type
select histogram(status_achieved, FIXED_INTERVAL 1 day) as h
or
select histogram(status_achieved, CALANDER_INTERVAL 1 day) as h

it fails with errors. what would be the correct syntax. can't find it anywhere.

@elasticforme the deprecation message being displayed issue has been fixed in this PR: https://github.com/elastic/elasticsearch/pull/45501. The fix should be available in 7.2.2 and 7.3.1.

yes that I know.
I am already using 7.2.0
and want to use calander_interval but does not work.

I guess I will give it try on 7.3.2 test machine that I have

Yes, you cannot decide which type of interval to use. HISTOGRAM always uses fixed_interval and it's not configurable because SQL doesn't have a notion of configurable histograms.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.