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: Implement DATE_PARSE #54962

Open
matriv opened this issue Apr 8, 2020 · 10 comments · May be fixed by #57391
Open

SQL: Implement DATE_PARSE #54962

matriv opened this issue Apr 8, 2020 · 10 comments · May be fixed by #57391

Comments

@matriv
Copy link
Contributor

@matriv matriv commented Apr 8, 2020

Implement DATE_PARSE(<date_str>, <pattern_str>) function
which allows to parse a date string according to the specified
pattern into a date object. The patterns allowed are those of
java.time.format.DateTimeFormatter.

Follows: #54960

@elasticmachine
Copy link
Collaborator

@elasticmachine elasticmachine commented Apr 8, 2020

Pinging @elastic/es-ql (:Query Languages/SQL)

@Patrick0308
Copy link
Contributor

@Patrick0308 Patrick0308 commented Apr 10, 2020

Hi @matriv, I want to know that what's the different between <date_str>, <datetime_str>, <time_str>.

@matriv
Copy link
Contributor Author

@matriv matriv commented Apr 10, 2020

date_str contains only date information, e.g.: 20/05/2020 and returns an object of DATE data type.
time_str contains only time information, e.g.: 10:20:30.12345 and returns an object of TIME data type.
datetime_str contains both, e.g.: 20-05-2020 10:20:30.123 and returns an object of DATETIME data type.

@Patrick0308
Copy link
Contributor

@Patrick0308 Patrick0308 commented Apr 11, 2020

@matriv Thank you for explaining. Let me try.

@matriv
Copy link
Contributor Author

@matriv matriv commented Apr 11, 2020

@Patrick0308 Thank you!

@matriv
Copy link
Contributor Author

@matriv matriv commented Apr 11, 2020

@Patrick0308 I would suggest though to wait for #55095 since this will re-arrange some code, with the introduction of an enum, or simpler a new argument to the Processor so that TIME and then DATE can be parsed with 2 new separate functions.

@Patrick0308
Copy link
Contributor

@Patrick0308 Patrick0308 commented Apr 11, 2020

@matriv Ok, I will pay attention to the progress of #55095 .

@matriv
Copy link
Contributor Author

@matriv matriv commented Apr 14, 2020

@Patrick0308 Would you like to take over #55095 ? or you could just implement the DATE_PARSE with similar approach as described in my comments there.

@paytonmcl
Copy link

@paytonmcl paytonmcl commented Apr 20, 2020

I would like to contribute to fix this issue. Could I get assigned? This would be my first issue.

@rjernst rjernst added the Team:QL label May 4, 2020
@sakthivigneshkumar
Copy link

@sakthivigneshkumar sakthivigneshkumar commented May 24, 2020

Can I Contribute to fix this issue? Please let me know if it is open. This would be my first issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants
You can’t perform that action at this time.