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
I believe this was actually a red herring - it appears to have invoked the v1 SQLEngine which doesn't have timestamp, and thus couldn't return the precision. It's now working correctly after some other changes.
Activity
Yury-Fridlyand commentedon Oct 17, 2022
Test data:
test_data.zip
MaxKsyunz commentedon Oct 18, 2022
The problem is here.

This is the definition of

DATE_TIME_FORMATTERThe correct solution should use the formatter specified in the mapping for the field or whatever is set as the default formatter in OpenSearch[*].
Here are the docs for date field formatters.
[*] I thought I read somewhere it's a setting, but I can't find it. Default formatters used by OpenSearch are here.
MaxKsyunz commentedon Oct 19, 2022
constructTimestampshould be able to useDateFormatters.forPatternto get date formatter for one of the pre-defined formats.kylepbit commentedon Oct 19, 2022
I believe this was actually a red herring - it appears to have invoked the v1 SQLEngine which doesn't have timestamp, and thus couldn't return the precision. It's now working correctly after some other changes.