Skip to content
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

Fix pattern tests in release builds #120879

Merged
merged 7 commits into from
Jan 28, 2025
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 @@ -2940,6 +2940,8 @@ public void testNamedFunctionArgumentWithUnsupportedNamedParameterTypes() {
}

public void testValidJoinPattern() {
assumeTrue("LOOKUP JOIN requires corresponding capability", EsqlCapabilities.Cap.JOIN_LOOKUP_V12.isEnabled());

var basePattern = randomIndexPatterns();
var joinPattern = randomIndexPattern(without(WILDCARD_PATTERN));
var onField = randomIdentifier();
Expand All @@ -2958,6 +2960,8 @@ public void testValidJoinPattern() {
}

public void testInvalidJoinPatterns() {
assumeTrue("LOOKUP JOIN requires corresponding capability", EsqlCapabilities.Cap.JOIN_LOOKUP_V12.isEnabled());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please let me know if it is more preferable to rely on Build.current().isSnapshot() instead since JOIN_LOOKUP_V12 version is frequently incremented.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is fine/preferable. We have one main capability JOIN_LOOKUP_V12 and all related caps should be enabled or disabled based on this.


var joinPattern = randomIndexPattern(WILDCARD_PATTERN);
expectError(
"FROM " + randomIndexPatterns() + " | JOIN " + joinPattern + " ON " + randomIdentifier(),
Expand Down