I have submitted this query and am receiving the null pointer error. We are running Open Distro v7.9.1 which should include 1.11 version of SQL, not sure why I am using this error. If the version I’m working with can’t accept date_add in the simplest way I cannot do more complex things that I really need to.
POST _opendistro/_sql { "query": "SELECT date_add(\"2021-07-12\", INTERVAL 59 second) FROM my-index-*" }
BUMP – Broken Date functions in AWS Managed Elastic Search??
As Ed points out above, we are running AWS Elasticsearch 7.9 which AWS Support tells us is running OD SQL 1.11.0 … however, we are unable to get the date functions working as documented.
Is anyone else running into problems with AES 7.9 and OD SQL 1.11.0 date functions?
AWS Support is trying to point the finger at the OD SQL team for releasing broken date functions in 1.11.0 which were later fixed in 1.13.0 but I can’t confirm that in the github repo.
As it turns out, AWS ES 7.9 has the “new SQL engine” disabled. Running the following seems to enable it and open up the world of date_functions which were born in 1.11.0 but “hidden” until 1.13.0 when the “new engine” was enabled by default.
thanks @chloe-zh … but to be clear, AWS ES 7.9 has no date_functions turned on by default until you enable them via the OD SQL settings as I detailed above.
@jpf321 the new engine was not turned on by default until the odfe v1.13.0.0 when it turned stable. So only versions no earlier than odfe1.13 has the new engine turned on by default. And 1.13 maps to es version of 7.10.2. If you would like to use the new engine by default, please upgrade the version to 7.10
Yes thank @chloe-zh … but you can enable the “new engine” within 1.11.0 in 7.9 (AWS ES) with the below (we understand it may not be considered “stable”) :