Skip to content

Commit e73996f

Browse files
Fix failing UTs part 2
1 parent 9603a7c commit e73996f

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5163,6 +5163,9 @@ FROM multi_column_joinable
51635163
| LIMIT 20
51645164
;
51655165

5166+
warning:Line 2:3: evaluation of [LOOKUP JOIN multi_column_joinable_lookup ON id_int, is_active_bool] failed, treating result as null. Only first 20 failures recorded.
5167+
warning:Line 2:3: java.lang.IllegalArgumentException: LOOKUP JOIN encountered multi-value
5168+
51665169
id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:integer
51675170
4 | David | qux | zeta | 6000
51685171
5 | Eve | quux | eta | 7000
@@ -5188,6 +5191,9 @@ FROM multi_column_joinable
51885191
| LIMIT 20
51895192
;
51905193

5194+
warning:Line 2:3: evaluation of [LOOKUP JOIN multi_column_joinable_lookup ON id_int, is_active_bool] failed, treating result as null. Only first 20 failures recorded.
5195+
warning:Line 2:3: java.lang.IllegalArgumentException: LOOKUP JOIN encountered multi-value
5196+
51915197
id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:integer
51925198
4 | David | qux | zeta | 6000
51935199
5 | Eve | quux | eta | 7000
@@ -5242,6 +5248,11 @@ FROM multi_column_joinable
52425248
| LIMIT 20
52435249
;
52445250

5251+
warning:Line 2:3: evaluation of [LOOKUP JOIN multi_column_joinable_lookup ON id_int, is_active_bool] failed, treating result as null. Only first 20 failures recorded.
5252+
warning:Line 2:3: java.lang.IllegalArgumentException: LOOKUP JOIN encountered multi-value
5253+
warning:Line 3:23: evaluation of [id_int + 5000] failed, treating result as null. Only first 20 failures recorded.
5254+
warning:Line 3:23: java.lang.IllegalArgumentException: single-value function encountered multi-value
5255+
52455256
id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:integer
52465257
4 | David | qux | zeta | 6000
52475258
5 | Eve | quux | eta | 7000
@@ -5267,6 +5278,11 @@ lookupJoinWithMixJoinAndNonJoinColumnsPushable
52675278
| LIMIT 20
52685279
;
52695280

5281+
warning:Line 2:3: evaluation of [LOOKUP JOIN multi_column_joinable_lookup ON id_int, is_active_bool] failed, treating result as null. Only first 20 failures recorded.
5282+
warning:Line 2:3: java.lang.IllegalArgumentException: LOOKUP JOIN encountered multi-value
5283+
warning:Line 3:18: evaluation of [id_int + 5000] failed, treating result as null. Only first 20 failures recorded.
5284+
warning:Line 3:18: java.lang.IllegalArgumentException: single-value function encountered multi-value
5285+
52705286
id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:integer
52715287
4 | David | qux | zeta | 6000
52725288
5 | Eve | quux | eta | 7000
@@ -5291,6 +5307,9 @@ lookupJoinWithMixJoinAndNonJoinColumnsPushable
52915307
| LIMIT 20
52925308
;
52935309

5310+
warning:Line 3:9: evaluation of [id_int > 7] failed, treating result as null. Only first 20 failures recorded.
5311+
warning:Line 3:9: java.lang.IllegalArgumentException: single-value function encountered multi-value
5312+
52945313
id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:integer
52955314
8 | Hank | garply | lambda | 11000
52965315
9 | null | waldo | null | null
@@ -5316,6 +5335,9 @@ lookupJoinWithExpressionOfOtherFields
53165335
NEED TO DEBUG WHY THE FILTER IS NOT PUSHED TO THE RIGHT SIDE OF THE LOOKUP JOIN
53175336
*/
53185337
;
5338+
5339+
warning:Line 2:3: evaluation of [LOOKUP JOIN multi_column_joinable_lookup ON id_int, is_active_bool] failed, treating result as null. Only first 20 failures recorded.
5340+
warning:Line 2:3: java.lang.IllegalArgumentException: LOOKUP JOIN encountered multi-value
53195341

53205342
id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:integer
53215343
5 | Eve | quux | eta | 7000

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/ExpressionQueryList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ExpressionQueryList(
5555

5656
private void buildPrePostJoinFilter(PhysicalPlan rightPreJoinPlan, ClusterService clusterService) {
5757
// we support a FilterExec as the pre-join filter
58-
// if we filter Exec is not translatable to a QueryBuilder, we will apply it after the join
58+
// if the filter Exec is not translatable to a QueryBuilder, we will apply it after the join
5959
if (rightPreJoinPlan instanceof FilterExec filterExec) {
6060
try {
6161
LucenePushdownPredicates lucenePushdownPredicates = LucenePushdownPredicates.from(

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/LookupFromIndexService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,11 @@ public void writeTo(StreamOutput out) throws IOException {
277277
}
278278
if (out.getTransportVersion().onOrAfter(TransportVersions.ESQL_LOOKUP_JOIN_PRE_JOIN_FILTER)) {
279279
planOut.writeOptionalNamedWriteable(rightPreJoinPlan);
280-
} else if (rightPreJoinPlan != null) {
281-
throw new EsqlIllegalArgumentException("LOOKUP JOIN with pre-join filter is not supported on remote node");
282280
}
281+
// JULIAN TODO: need a better way to indicate that the filter does not need to be applied here
282+
/*else if (rightPreJoinPlan != null) {
283+
throw new EsqlIllegalArgumentException("LOOKUP JOIN with pre-join filter is not supported on remote node");
284+
}*/
283285
}
284286

285287
@Override

0 commit comments

Comments
 (0)