Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
matriv opened this issue Mar 29, 2019 · 3 comments
Closed

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

matriv opened this issue Mar 29, 2019 · 3 comments
Labels
:Analytics/SQL SQL querying >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@matriv
Copy link
Contributor

matriv commented Mar 29, 2019

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.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@matriv matriv self-assigned this Mar 30, 2019
@matriv matriv removed their assignment Apr 20, 2020
@rjernst rjernst added the Team:QL (Deprecated) Meta label for query languages team label May 4, 2020
@wchaparro wchaparro removed the Team:QL (Deprecated) Meta label for query languages team label Jan 17, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jan 17, 2024
@wchaparro
Copy link
Member

Superceded by ES|QL

@wchaparro wchaparro closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

5 participants