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
Original file line number Diff line number Diff line change
Expand Up @@ -3405,6 +3405,8 @@ public void testRrfError() {
}

public void testRandomSampleProbability() {
assumeTrue("requires SAMPLE capability", EsqlCapabilities.Cap.SAMPLE.isEnabled());

var e = expectThrows(VerificationException.class, () -> analyze("FROM test | SAMPLE 1."));
assertThat(e.getMessage(), containsString("RandomSampling probability must be strictly between 0.0 and 1.0, was [1.0]"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3486,6 +3486,7 @@ public void testInvalidCompletion() {
}

public void testSample() {
assumeTrue("SAMPLE requires corresponding capability", EsqlCapabilities.Cap.SAMPLE.isEnabled());
expectError("FROM test | SAMPLE .1 2 3", "line 1:25: extraneous input '3' expecting <EOF>");
expectError("FROM test | SAMPLE .1 \"2\"", "line 1:23: extraneous input '\"2\"' expecting <EOF>");
expectError("FROM test | SAMPLE 1", "line 1:20: mismatched input '1' expecting {DECIMAL_LITERAL, '+', '-'}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ setup:
- do: {xpack.usage: {}}
- match: { esql.available: true }
- match: { esql.enabled: true }
- length: { esql.features: 25 }
- length: { esql.features: 26 }
- set: {esql.features.dissect: dissect_counter}
- set: {esql.features.drop: drop_counter}
- set: {esql.features.eval: eval_counter}
Expand All @@ -165,6 +165,7 @@ setup:
- set: {esql.features.fork: fork_counter}
- set: {esql.features.rrf: rrf_counter}
- set: {esql.features.completion: completion_counter}
- set: {esql.features.sample: sample_counter}
- length: { esql.queries: 3 }
- set: {esql.queries.rest.total: rest_total_counter}
- set: {esql.queries.rest.failed: rest_failed_counter}
Expand Down Expand Up @@ -220,7 +221,7 @@ setup:
- gt: {esql.functions.to_long: $functions_to_long}
- match: {esql.functions.coalesce: $functions_coalesce}
- gt: {esql.functions.categorize: $functions_categorize}
- length: {esql.functions: 131} # check the "sister" test above for a likely update to the same esql.functions length check
- length: {esql.functions: 132} # check the "sister" test above for a likely update to the same esql.functions length check
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is needed for last_over_time, which bumped the sister test but not this one.


---
took:
Expand Down