Skip to content

Commit b5f15b3

Browse files
committed
Add csv tests
1 parent 0171eb7 commit b5f15b3

File tree

1 file changed

+33
-0
lines changed
  • x-pack/plugin/esql/qa/testFixtures/src/main/resources

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,3 +637,36 @@ foo:keyword
637637
;
638638

639639

640+
evalAfterAvgUsingSameName
641+
from employees
642+
| stats avg = avg(salary)
643+
| eval avg = 12
644+
;
645+
646+
avg:integer
647+
12
648+
;
649+
650+
evalAfterStatsUsingSameName
651+
from employees
652+
| stats count = count(emp_no), median = median(salary), top_salaries = TOP(salary, 3, "desc")
653+
| keep median, top_salaries
654+
| rename top_salaries as median
655+
| eval median = 12
656+
;
657+
658+
median:integer
659+
12
660+
;
661+
662+
evalAfterStatsUsingSameName2
663+
ROW foo = [10, 11, 12]
664+
| mv_expand foo
665+
| stats sum = sum(foo), max = max(foo)
666+
| rename sum as max
667+
| eval max = 13
668+
;
669+
670+
max:integer
671+
13
672+
;

0 commit comments

Comments
 (0)