Skip to content
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,23 @@ public void testLookupJoinMissingLocalIndex() throws IOException {
}
}

public void testLookupJoinMissingLocalIndexAfterPipelineBreaker() throws IOException {
setupClusters(2);
populateLookupIndex(REMOTE_CLUSTER_1, "values_lookup", 10);

var ex = expectThrows(
VerificationException.class,
() -> runQuery(
"FROM c*:logs-* | EVAL lookup_key = v | STATS lookup_key = max(lookup_key) | LOOKUP JOIN values_lookup ON lookup_key",
randomBoolean()
)
);
assertThat(
ex.getMessage(),
containsString("LOOKUP JOIN with remote indices can't be executed after [STATS lookup_key = max(lookup_key)]")
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this could be simplified to:

Suggested change
var ex = expectThrows(
VerificationException.class,
() -> runQuery(
"FROM c*:logs-* | EVAL lookup_key = v | STATS lookup_key = max(lookup_key) | LOOKUP JOIN values_lookup ON lookup_key",
randomBoolean()
)
);
assertThat(
ex.getMessage(),
containsString("LOOKUP JOIN with remote indices can't be executed after [STATS lookup_key = max(lookup_key)]")
);
}
expectThrows(
VerificationException.class,
containsString("LOOKUP JOIN with remote indices can't be executed after [STATS lookup_key = max(lookup_key)]"),
() -> runQuery(
"FROM c*:logs-* | EVAL lookup_key = v | STATS lookup_key = max(lookup_key) | LOOKUP JOIN values_lookup ON lookup_key",
randomBoolean()
)
);
}


public void testLookupJoinMissingKey() throws IOException {
setupClusters(2);
populateLookupIndex(LOCAL_CLUSTER, "values_lookup", 10);
Expand Down