opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
110 stars 129 forks source link

[BUG] `str_to_date` does not work with two-digits year #2741

Open LantaoJin opened 4 weeks ago

LantaoJin commented 4 weeks ago

What is the bug? str_to_date function in https://opensearch.org/docs/latest/search-plugins/sql/functions/#date-and-time does not work with two-digits year (RFC 822 date-time formatted).

How can one reproduce the bug? Steps to reproduce the behavior: Make a similar query

SELECT str_to_date('03-Jan-24', '%d-%b-%y');

returns 0024-01-03 00:00:00

What is the expected behavior? Return 2024-01-03 00:00:00

What is your host/environment?

Do you have any screenshots? If applicable, add screenshots to help explain your problem.

Do you have any additional context? Add any other context about the problem.

dblock commented 1 week ago

[Catch All Triage - Attendees 1, 2, 3, 4, 5]