Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luigidellaquila committed Oct 18, 2024
1 parent 627a252 commit 052f0b2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,12 @@ public enum Cap {
/**
* Fix for https://github.com/elastic/elasticsearch/issues/114714
*/
FIX_STATS_BY_FOLDABLE_EXPRESSION;
FIX_STATS_BY_FOLDABLE_EXPRESSION,

/**
* Adding stats for functions (stack telemetry)
*/
FUNCTION_STATS;

private final boolean snapshotOnly;
private final FeatureFlag featureFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ setup:
- method: POST
path: /_query
parameters: [ method, path, parameters, capabilities ]
capabilities: [ no_meta ]
capabilities: [ function_stats ]
reason: "META command removed which changes the count of the data returned"
test_runner_features: [capabilities]

Expand Down Expand Up @@ -51,11 +51,16 @@ setup:
- set: {esql.queries.kibana.failed: kibana_failed_counter}
- set: {esql.queries._all.total: all_total_counter}
- set: {esql.queries._all.failed: all_failed_counter}
- set: {esql.functions.max: functions_max}
- set: {esql.functions.min: functions_min}
- set: {esql.functions.cos: functions_cos}
- set: {esql.functions.to_long: functions_to_long}
- set: {esql.functions.coalesce: functions_coalesce}

- do:
esql.query:
body:
query: 'from test | where data > 2 | sort count desc | limit 5 | stats m = max(data)'
query: 'from test | where data > 2 and to_long(data) > 2 | sort count desc | limit 5 | stats m = max(data)'

- do: {xpack.usage: {}}
- match: { esql.available: true }
Expand All @@ -73,3 +78,8 @@ setup:
- match: {esql.queries.kibana.failed: $kibana_failed_counter}
- gt: {esql.queries._all.total: $all_total_counter}
- match: {esql.queries._all.failed: $all_failed_counter}
- gt: {esql.functions.max: $functions_max}
- match: {esql.functions.min: $functions_min}
- match: {esql.functions.cos: $functions_cos}
- gt: {esql.functions.to_long: $functions_to_long}
- match: {esql.functions.coalesce: $functions_coalesce}

0 comments on commit 052f0b2

Please sign in to comment.