-
Notifications
You must be signed in to change notification settings - Fork 190
[BUG] SQL query doesn't support different date formats without date casting #2700
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingv2.16.0Issues targeting release v2.16.0Issues targeting release v2.16.0
Description
What is the bug?
Getting below error for user defined date format
"{\n \"error\": {\n \"reason\": \"Invalid SQL query\",\n \"details\": \"date:03-Jan-24 in unsupported format, please use 'yyyy-MM-dd'\",\n \"type\": \"SemanticCheckException\"\n },\n \"status\": 400\n}"
How can one reproduce the bug?
Steps to reproduce the behavior:
PUT testindex
{
"mappings" : {
"properties" : {
"release_date" : {
"type" : "date",
"format" : "dd-MMM-yy"
}
}
}
}
PUT testindex/_doc/21
{
"release_date" : "03-Jan-24"
}
POST _plugins/_sql
{
"query":"select release_date from testindex where release_date='03-Jan-24'"
}
What is the expected behavior?
Query should work without date casting
What is your host/environment?
- OS: [e.g. iOS]
- Version [e.g. 22]
- Plugins
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingv2.16.0Issues targeting release v2.16.0Issues targeting release v2.16.0