-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESQL: Mismatching mapping cannot be worked around with eval (Support for union types) #100603
Comments
Pinging @elastic/es-ql (Team:QL) |
Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL) |
In discussions it was learned that this is not currently supported and not completely trivial to support either, since the current query planning process assumes a singular type for all fields coming from the indices, and throughout the query. Since querying multiple indices with different field types is in fact a common Elasticsearch use case, we'd like to support this at some point, so we'll label this as an |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
I have multiple indices with the field
host.ip
, and most are mapped as typeip
, but one is mapped askeyword
. In a recent discussion it was mentioned that we could get around this using functions to convert types, however that does not appear to work:Produces the error:
Trying to keep the same name using
eval host.ip = to_ip(host.ip)
also results in the same error. If I run instead on indices that have onlykeyword
or onlyip
, then both queries work.The text was updated successfully, but these errors were encountered: