Skip to content

Commit bfc6ae3

Browse files
committed
Some fixes the javadocs
1 parent 048c423 commit bfc6ae3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/LookupJoinTypesIT.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,16 @@
5252
* For each pair of types being tested, it builds a main index called "index" containing a single document with as many fields as
5353
* types being tested on the left of the pair, and then creates that many other lookup indexes, each with a single document containing
5454
* exactly two fields: the field to join on, and a field to return.
55+
* The assertion is that for valid combinations, the return result should exist, and for invalid combinations an exception should be thrown.
56+
* If no exception is thrown, and no result is returned, our validation rules are not aligned with the internal behaviour (ie. a bug).
57+
* Since the `LOOKUP JOIN` command requires the match field name to be the same between the main index and the lookup index,
58+
* we will have field names that correctly represent the type of the field in the main index, but not the type of the field
59+
* in the lookup index. This can be confusing, but it is important to remember that the field names are not the same as the types.
5560
* For example, if we are testing the pairs (double, double), (double, float), (float, double) and (float, float),
5661
* we will create the following indexes:
5762
* <dl>
58-
* <dt>index_double_double: containing</dt>
59-
* <dd>Index containing da single document with a field of type 'double' like: <pre>
63+
* <dt>index_double_double</dt>
64+
* <dd>Index containing a single document with a field of type 'double' like: <pre>
6065
* {
6166
* "field_double": 1.0, // this is mapped as type 'double'
6267
* "other": "value"
@@ -65,14 +70,14 @@
6570
* <dt>index_double_float</dt>
6671
* <dd>Index containing a single document with a field of type 'float' like: <pre>
6772
* {
68-
* "field_double": 1.0, // this is mapped as type 'float'
73+
* "field_double": 1.0, // this is mapped as type 'float' (a float with the name of the main index field)
6974
* "other": "value"
7075
* }
7176
* </pre></dd>
7277
* <dt>index_float_double</dt>
7378
* <dd>Index containing a single document with a field of type 'double' like: <pre>
7479
* {
75-
* "field_float": 1.0, // this is mapped as type 'double'
80+
* "field_float": 1.0, // this is mapped as type 'double' (a double with the name of the main index field)
7681
* "other": "value"
7782
* }
7883
* </pre></dd>
@@ -86,8 +91,8 @@
8691
* <dt>index</dt>
8792
* <dd>Index containing document like: <pre>
8893
* {
89-
* "field_double": 1.0,
90-
* "field_float": 1.0
94+
* "field_double": 1.0, // this is mapped as type 'double'
95+
* "field_float": 1.0 // this is mapped as type 'float'
9196
* }
9297
* </pre></dd>
9398
* </dl>

0 commit comments

Comments
 (0)