Skip to content

SQL: Allow TIME data type in GROUP BY & HISTOGRAM #40639

Closed as not planned
Closed as not planned
@matriv

Description

@matriv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions