mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
It has been noted that strange or incorrect error messages are returned if the ENRICH command uses incompatible data types, for example a KEYWORD with value 'foo' using in an int_range match: https://github.com/elastic/elasticsearch/issues/107357 This error is thrown at runtime and contradicts the ES|QL policy of only throwing errors at planning time, while at runtime we should instead set results to null and add a warning. However, we could make the planner stricter and block potentially mismatching types earlier. However runtime parsing of KEYWORD fields has been a feature of ES|QL ENRICH since it's inception, in particular we even have tests asserting that KEYWORD fields containing parsable IP data can be joined to an ip_range ENRICH index. In order to not create a backwards compatibility problem, we have compromised with the following: * Strict range type checking at the planner time for incompatible range types, unless the incoming index field is KEYWORD * For KEYWORD fields, allow runtime parsing of the fields, but when parsing fails, set the result to null and add a warning Added extra tests to verify behaviour of match policies on non-keyword fields. They all behave as keywords (the enrich field is converted to keyword at policy execution time, and the input data is converted to keyword at lookup time). |
||
---|---|---|
.. | ||
functions | ||
processing-commands | ||
source-commands | ||
esql-across-clusters.asciidoc | ||
esql-apis.asciidoc | ||
esql-async-query-api.asciidoc | ||
esql-async-query-delete-api.asciidoc | ||
esql-async-query-get-api.asciidoc | ||
esql-commands.asciidoc | ||
esql-enrich-data.asciidoc | ||
esql-examples.asciidoc | ||
esql-functions-operators.asciidoc | ||
esql-get-started.asciidoc | ||
esql-kibana.asciidoc | ||
esql-language.asciidoc | ||
esql-limitations.asciidoc | ||
esql-multi-index.asciidoc | ||
esql-process-data-with-dissect-grok.asciidoc | ||
esql-query-api.asciidoc | ||
esql-rest.asciidoc | ||
esql-security-solution.asciidoc | ||
esql-syntax.asciidoc | ||
esql-using.asciidoc | ||
implicit-casting.asciidoc | ||
index.asciidoc | ||
metadata-fields.asciidoc | ||
multivalued-fields.asciidoc | ||
task-management.asciidoc | ||
time-spans.asciidoc |