You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT hire_date FROM test_emp WHERE hire_date >= NOW() - INTERVAL 200 YEARS AND hire_date < NOW() - INTERVAL 2 YEARS
will end up returning an error:
"root_cause": [
{
"type": "parse_exception",
"reason": "failed to parse date field [1819-10-15T04:45:20.641Z] with format [yyyy-MM-dd' 'HH:mm:ss]: [failed to parse date field [1819-10-15T04:45:20.641Z] with format [yyyy-MM-dd' 'HH:mm:ss]]"
}
]
The error above does also happen only when the date format of the hire_date field is a custom one (non-default).
The reason for the error seems to be the lack of format attribute (added following this PR) on the range ES query generated for this sql query, which should enforce the range query to one known format - the one of NOW(), CURRENT_DATE() functions.
The text was updated successfully, but these errors were encountered:
SELECT hire_date FROM test_emp WHERE hire_date >= NOW() - INTERVAL 200 YEARS AND hire_date < NOW() - INTERVAL 2 YEARS
will end up returning an error:
The error above does also happen only when the date format of the
hire_date
field is a custom one (non-default).The reason for the error seems to be the lack of
format
attribute (added following this PR) on therange
ES query generated for this sql query, which should enforce therange
query to one known format - the one ofNOW()
,CURRENT_DATE()
functions.The text was updated successfully, but these errors were encountered: