Currently TIME data type is internally modelled as OffsetTime which is not treated correctly by ES scripting modules which causes queries like:
SELECT count(*) FROM test GROUP BY CAST(date_created AS TIME);
and
SELECT HISTOGRAM(CAST(birth_date AS TIME), INTERVAL '10' MINUTES) as h, COUNT(*) FROM t GROUP BY h
to fail.
To correctly implement this TIME -> OffsetTime must be converted to Long for the scripting purposes and converted back to OffsetTime when values are extracted from ES response.
Currently
TIMEdata type is internally modelled asOffsetTimewhich is not treated correctly by ES scripting modules which causes queries like:and
to fail.
To correctly implement this
TIME-> OffsetTime must be converted to Long for the scripting purposes and converted back toOffsetTimewhen values are extracted from ES response.