Elasticsearch connector supports custom date formats
Description
The current Elasticsearch Connector does not support custom date formats. When query such types, they are automatically skipped. This PR supports custom date formats.
Additional context and related issues
Please review the previous code comments below:
class: io.trino.plugin.elasticsearch.ElasticsearchMetadata
function: TypeAndDecoder toTrino(String prefix, IndexMetadata.Field field)
line: 328
comments: // otherwise, skip -- we don't support custom formats, yet
Release notes
(x) This is not user-visible or is docs only, and no release notes are required. ( ) Release notes are required. Please propose a release note for me. ( ) Release notes are required, with the following suggested text:
# Section
* Fix some things. Elasticsearch connector supports custom date type formats
There's an existing PR #14925. Please coordinate with @ysn2233
Hi @ebyhr and @ysn2233 , I see the PR14925 was closed last week . I have already compared the differences between these two PRs. The main difference is whether to set the default parsing format. In my PR, I retain the previous parsing code and add new format. The code only affects the changes of the new format. Do you have any suggestions? Thanks
public void decode(SearchHit hit, Supplier<Object> getter, BlockBuilder output)
{
if (pattern == null || pattern.isEmpty()) {
// previous code, no change.
// it supports no formats timestamp
}
else {
// the new code only here
// it supports timestamp with formats
}
}
There's an existing PR #14925. Please coordinate with @ysn2233
the closed one was moved to https://github.com/trinodb/trino/pull/20759
the closed one was moved to #20759
OK, Thanks. I just found it.
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua
Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.