Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/reference/esql/esql-lookup-join.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,29 @@ To obtain a join key with a compatible type, use a
For a complete list of supported data types and their internal
representations, see the <<esql-supported-types,Supported Field Types documentation>>.

[discrete]
[[esql-lookup-join-usage-notes]]
==== Usage notes

This section covers important details about `LOOKUP JOIN` that impact query behavior and results. Review these details to ensure your queries work as expected and to troubleshoot unexpected results.

[discrete]
[[esql-lookup-join-usage-notes-name-collisions]]
===== Handling name collisions

When fields from the lookup index match existing column names, the new columns override the existing ones.
Before the `LOOKUP JOIN` command, preserve columns by either:

* Using `RENAME` to assign non-conflicting names
* Using `EVAL` to create new columns with different names

[discrete]
[[esql-lookup-join-usage-notes-sorting]]
===== Sorting behavior

The output rows produced by `LOOKUP JOIN` can be in any order and may not
respect preceding `SORT` commands. To guarantee a certain ordering, place a `SORT` after any `LOOKUP JOIN` commands.

[discrete]
[[esql-lookup-join-limitations]]
==== Limitations
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/esql/processing-commands/lookup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ results, the output will contain one row for each matching combination.

[TIP]
====
In case of name collisions, the newly created columns will override existing columns.
For important information about using `LOOKUP JOIN`, refer to <<esql-lookup-join-usage-notes,Usage notes>>.
====

*Examples*
Expand Down
7 changes: 7 additions & 0 deletions docs/reference/esql/processing-commands/mv_expand.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ MV_EXPAND column
`column`::
The multivalued column to expand.

[WARNING]
======
The output rows produced by `MV_EXPAND` can be in any order and may not respect
preceding `SORT` commands. To guarantee a certain ordering, place a `SORT` after any
`MV_EXPAND` commands.
======

*Example*

[source.merge.styled,esql]
Expand Down