3
3
//
4
4
5
5
maxOfInt
6
- required_capability: inlinestats_v5
6
+ required_capability: inlinestats_v6
7
7
// tag::max-languages[]
8
8
FROM employees
9
9
| KEEP emp_no, languages
@@ -25,7 +25,7 @@ emp_no:integer | languages:integer | max_lang:integer
25
25
;
26
26
27
27
maxOfIntByKeyword
28
- required_capability: inlinestats_v5
28
+ required_capability: inlinestats_v6
29
29
30
30
FROM employees
31
31
| KEEP emp_no, languages, gender
@@ -43,7 +43,7 @@ emp_no:integer | languages:integer | max_lang:integer | gender:keyword
43
43
;
44
44
45
45
maxOfLongByKeyword
46
- required_capability: inlinestats_v5
46
+ required_capability: inlinestats_v6
47
47
48
48
FROM employees
49
49
| KEEP emp_no, avg_worked_seconds, gender
@@ -58,7 +58,7 @@ emp_no:integer | avg_worked_seconds:long | max_avg_worked_seconds:long | gender:
58
58
;
59
59
60
60
maxOfLong
61
- required_capability: inlinestats_v5
61
+ required_capability: inlinestats_v6
62
62
63
63
FROM employees
64
64
| KEEP emp_no, avg_worked_seconds, gender
@@ -71,7 +71,7 @@ emp_no:integer | avg_worked_seconds:long | gender:keyword | max_avg_worked_secon
71
71
;
72
72
73
73
maxOfLongByCalculatedKeyword
74
- required_capability: inlinestats_v5
74
+ required_capability: inlinestats_v6
75
75
76
76
// tag::longest-tenured-by-first[]
77
77
FROM employees
@@ -94,7 +94,7 @@ emp_no:integer | avg_worked_seconds:long | last_name:keyword | max_avg_worked_se
94
94
;
95
95
96
96
maxOfLongByCalculatedNamedKeyword
97
- required_capability: inlinestats_v5
97
+ required_capability: inlinestats_v6
98
98
99
99
FROM employees
100
100
| KEEP emp_no, avg_worked_seconds, last_name
@@ -113,7 +113,7 @@ emp_no:integer | avg_worked_seconds:long | last_name:keyword | max_avg_worked_se
113
113
;
114
114
115
115
maxOfLongByCalculatedDroppedKeyword
116
- required_capability: inlinestats_v5
116
+ required_capability: inlinestats_v6
117
117
118
118
FROM employees
119
119
| INLINESTATS max_avg_worked_seconds = MAX(avg_worked_seconds) BY l = SUBSTRING(last_name, 0, 1)
@@ -132,7 +132,7 @@ emp_no:integer | avg_worked_seconds:long | last_name:keyword | max_avg_worked_se
132
132
;
133
133
134
134
maxOfLongByEvaledKeyword
135
- required_capability: inlinestats_v5
135
+ required_capability: inlinestats_v6
136
136
137
137
FROM employees
138
138
| EVAL l = SUBSTRING(last_name, 0, 1)
@@ -152,7 +152,7 @@ emp_no:integer | avg_worked_seconds:long | max_avg_worked_seconds:long | l:keywo
152
152
;
153
153
154
154
maxOfLongByInt
155
- required_capability: inlinestats_v5
155
+ required_capability: inlinestats_v6
156
156
157
157
FROM employees
158
158
| KEEP emp_no, avg_worked_seconds, languages
@@ -170,7 +170,7 @@ emp_no:integer | avg_worked_seconds:long | max_avg_worked_seconds:long | languag
170
170
;
171
171
172
172
maxOfLongByIntDouble
173
- required_capability: inlinestats_v5
173
+ required_capability: inlinestats_v6
174
174
175
175
FROM employees
176
176
| KEEP emp_no, avg_worked_seconds, languages, height
@@ -205,8 +205,8 @@ emp_no:integer | languages:integer | avg_worked_seconds:long | gender:keyword |
205
205
10007 | 4 | 393084805 | F | 2.863684210555556E8 | 5
206
206
;
207
207
208
- byMultivaluedSimple-Ignore
209
- required_capability: join_planning_v1
208
+ byMultivaluedSimple
209
+ required_capability: inlinestats_v6
210
210
211
211
// tag::mv-group[]
212
212
FROM airports
@@ -223,8 +223,8 @@ abbrev:keyword | type:keyword | scalerank:integer | min_scalerank:integer
223
223
// end::mv-group-result[]
224
224
;
225
225
226
- byMultivaluedMvExpand-Ignore
227
- required_capability: join_planning_v1
226
+ byMultivaluedMvExpand
227
+ required_capability: inlinestats_v6
228
228
229
229
// tag::mv-expand[]
230
230
FROM airports
@@ -237,14 +237,14 @@ FROM airports
237
237
;
238
238
239
239
// tag::mv-expand-result[]
240
- abbrev:keyword | type:keyword | scalerank :integer | min_scalerank:integer
241
- GWL | mid | 9 | 2
242
- GWL | military | 9 | 4
240
+ abbrev:keyword | scalerank:integer | min_scalerank :integer | type:keyword
241
+ GWL |9 |2 |mid
242
+ GWL |9 |4 |military
243
243
// end::mv-expand-result[]
244
244
;
245
245
246
246
byMvExpand
247
- required_capability: inlinestats_v5
247
+ required_capability: inlinestats_v6
248
248
249
249
// tag::extreme-airports[]
250
250
FROM airports
@@ -308,7 +308,7 @@ count:long | country:keyword | avg:double
308
308
;
309
309
310
310
afterWhere
311
- required_capability: inlinestats_v5
311
+ required_capability: inlinestats_v6
312
312
313
313
FROM airports
314
314
| WHERE country != "United States"
@@ -367,7 +367,7 @@ abbrev:keyword | city:keyword | region:text | "COUNT(*)":long
367
367
;
368
368
369
369
beforeStats
370
- required_capability: inlinestats_v5
370
+ required_capability: inlinestats_v6
371
371
372
372
FROM airports
373
373
| EVAL lat = ST_Y(location)
@@ -380,7 +380,7 @@ northern:long | southern:long
380
380
;
381
381
382
382
beforeKeepSort
383
- required_capability: inlinestats_v5
383
+ required_capability: inlinestats_v6
384
384
385
385
FROM employees
386
386
| INLINESTATS max_salary = MAX(salary) by languages
@@ -394,8 +394,8 @@ emp_no:integer | languages:integer | max_salary:integer
394
394
10003 | 4 | 74572
395
395
;
396
396
397
- beforeKeepWhere-Ignore
398
- required_capability: join_planning_v1
397
+ beforeKeepWhere
398
+ required_capability: inlinestats_v6
399
399
400
400
FROM employees
401
401
| INLINESTATS max_salary = MAX(salary) by languages
@@ -407,8 +407,10 @@ emp_no:integer | languages:integer | max_salary:integer
407
407
10003 | 4 | 74572
408
408
;
409
409
410
- beforeEnrich-Ignore
410
+ beforeEnrich
411
411
required_capability: join_planning_v1
412
+ required_capability: inlinestats_v6
413
+ required_capability: enrich_load
412
414
413
415
FROM airports
414
416
| KEEP abbrev, type, city
@@ -419,10 +421,10 @@ FROM airports
419
421
| LIMIT 3
420
422
;
421
423
422
- abbrev:keyword | type :keyword | city:keyword | "COUNT(*)":long | region:text
423
- ABJ | mid | Abidjan | 499 | Abidjan
424
- ABV | major | Abuja | 385 | Municipal Area Council
425
- ACA | major | Acapulco de Juárez | 385 | Acapulco de Juárez
424
+ abbrev:keyword |city :keyword | "COUNT(*)":long|type:keyword | region:text
425
+ ABJ |Abidjan |499 |mid |Abidjan
426
+ ABV |Abuja |385 |major | Municipal Area Council
427
+ ACA |Acapulco de Juárez|385 |major | Acapulco de Juárez
426
428
;
427
429
428
430
beforeAndAfterEnrich-Ignore
@@ -501,7 +503,7 @@ Zürich | Zürich
501
503
;
502
504
503
505
byConstant
504
- required_capability: inlinestats_v5
506
+ required_capability: inlinestats_v6
505
507
506
508
FROM employees
507
509
| KEEP emp_no, languages
@@ -520,7 +522,7 @@ emp_no:integer | languages:integer | max_lang:integer | y:integer
520
522
;
521
523
522
524
aggConstant
523
- required_capability: inlinestats_v5
525
+ required_capability: inlinestats_v6
524
526
525
527
FROM employees
526
528
| KEEP emp_no
@@ -538,7 +540,7 @@ one:integer | emp_no:integer
538
540
;
539
541
540
542
percentile
541
- required_capability: inlinestats_v5
543
+ required_capability: inlinestats_v6
542
544
543
545
FROM employees
544
546
| KEEP emp_no, salary
@@ -557,7 +559,7 @@ emp_no:integer | salary:integer | ninety_fifth_salary:double
557
559
;
558
560
559
561
byTwoCalculated
560
- required_capability: inlinestats_v5
562
+ required_capability: inlinestats_v6
561
563
562
564
FROM airports
563
565
| WHERE abbrev IS NOT NULL
@@ -642,7 +644,7 @@ abbrev:keyword | scalerank:integer | location:geo_point
642
644
;
643
645
644
646
groupShadowsField
645
- required_capability: inlinestats_v5
647
+ required_capability: inlinestats_v6
646
648
647
649
FROM employees
648
650
| KEEP emp_no, salary, hire_date
@@ -661,7 +663,7 @@ emp_no:integer | salary:integer | avg_salary:double | hire_date:datetime
661
663
;
662
664
663
665
groupByExpression_And_ExistentField
664
- required_capability: inlinestats_v5
666
+ required_capability: inlinestats_v6
665
667
FROM employees
666
668
| KEEP emp_no, languages, gender
667
669
| EVAL x = "ABC"
@@ -679,7 +681,7 @@ emp_no:integer | languages:integer | x:keyword | max_lang:integer | y:keyword |
679
681
;
680
682
681
683
groupByRenamedColumn
682
- required_capability: inlinestats_v5
684
+ required_capability: inlinestats_v6
683
685
FROM employees
684
686
| KEEP emp_no, languages, gender
685
687
| INLINESTATS max_lang = MAX(languages) BY y = gender
@@ -787,7 +789,7 @@ emp_no:integer | languages:integer | gender:keyword|max_lang:integer| y:keyword
787
789
;
788
790
789
791
twoAggregatesGroupedBy_AField_And_AnExpression
790
- required_capability: inlinestats_v5
792
+ required_capability: inlinestats_v6
791
793
792
794
FROM employees
793
795
| KEEP emp_no, languages, gender, last_name
@@ -809,7 +811,7 @@ emp_no:integer |languages:integer|last_name:keyword|max_lang:integer|min_lang:in
809
811
;
810
812
811
813
groupByMultipleRenamedColumns_InversedOrder
812
- required_capability: inlinestats_v5
814
+ required_capability: inlinestats_v6
813
815
814
816
FROM employees
815
817
| KEEP emp_no, languages, still_hired, gender
@@ -827,7 +829,7 @@ emp_no:integer |languages:integer|still_hired:boolean| gender:keyword|max_lang:i
827
829
;
828
830
829
831
groupByMultipleRenamedColumns_InversedOrder_ComplexEval
830
- required_capability: inlinestats_v5
832
+ required_capability: inlinestats_v6
831
833
832
834
FROM employees
833
835
| KEEP emp_no, languages, still_hired, gender
@@ -846,7 +848,7 @@ emp_no:integer |languages:integer|still_hired:boolean| gender:keyword|multilingu
846
848
;
847
849
848
850
groupByMultipleRenamedColumns_AndComplexEval
849
- required_capability: inlinestats_v5
851
+ required_capability: inlinestats_v6
850
852
851
853
FROM employees
852
854
| KEEP emp_no, languages, still_hired, gender
@@ -888,7 +890,7 @@ emp_no:integer |languages:integer|gender:keyword |first_name:keyword | x:keyw
888
890
;
889
891
890
892
groupByRenamedExpression
891
- required_capability: inlinestats_v5
893
+ required_capability: inlinestats_v6
892
894
893
895
FROM employees
894
896
| KEEP emp_no, languages, gender, last_name
@@ -908,4 +910,62 @@ emp_no:integer |languages:integer|last_name:keyword|max_lang:integer|min_lang:in
908
910
10049 |5 |Tramer |5 |5 |T |F
909
911
10028 |null |Tempesti |1 |1 |T |M
910
912
;
913
+
914
+ doubleFilterOnLeftAndRight_InlineStats_Sides
915
+ required_capability: inlinestats_v6
911
916
917
+ FROM employees
918
+ | INLINESTATS max_salary = MAX(salary), min_salary = MIN(salary) by languages
919
+ | KEEP emp_no, languages, *salary
920
+ | WHERE salary > 65000 and languages > 2
921
+ | SORT emp_no
922
+ ;
923
+
924
+ emp_no:integer |languages:integer|salary:integer |max_salary:integer|min_salary:integer
925
+ 10007 |4 |74572 |74572 |27215
926
+ 10030 |3 |67492 |74970 |26436
927
+ 10045 |3 |74970 |74970 |26436
928
+ 10054 |4 |65367 |74572 |27215
929
+ 10062 |3 |65030 |74970 |26436
930
+ 10094 |5 |66817 |66817 |25324
931
+ 10097 |3 |71165 |74970 |26436
932
+ 10100 |4 |68431 |74572 |27215
933
+ ;
934
+
935
+ filterOnInlineStatsAggs
936
+ required_capability: inlinestats_v6
937
+
938
+ FROM employees
939
+ | INLINESTATS max_salary = MAX(salary), min_salary = MIN(salary) by languages
940
+ | KEEP emp_no, languages, *salary
941
+ | WHERE min_salary > 27000 or max_salary < 70000
942
+ | sort salary desc
943
+ | limit 5
944
+ ;
945
+
946
+ emp_no:integer |languages:integer|salary:integer |max_salary:integer|min_salary:integer
947
+ 10029 |null |74999 |74999 |28336
948
+ 10007 |4 |74572 |74572 |27215
949
+ 10027 |null |73851 |74999 |28336
950
+ 10099 |2 |73578 |73578 |29175
951
+ 10078 |2 |69904 |73578 |29175
952
+ ;
953
+
954
+ filterOnInlineStatsAggsValues_And_Groupings
955
+ required_capability: inlinestats_v6
956
+
957
+ FROM employees
958
+ | INLINESTATS max_salary = MAX(salary), min_salary = MIN(salary) by languages
959
+ | KEEP emp_no, languages, *salary
960
+ | WHERE (min_salary > 27000 or max_salary < 70000) and languages > 3
961
+ | sort salary
962
+ | limit 5
963
+ ;
964
+
965
+ emp_no:integer |languages:integer|salary:integer |max_salary:integer|min_salary:integer
966
+ 10015 |5 |25324 |66817 |25324
967
+ 10035 |5 |25945 |66817 |25324
968
+ 10057 |4 |27215 |74572 |27215
969
+ 10011 |5 |31120 |66817 |25324
970
+ 10066 |5 |31897 |66817 |25324
971
+ ;
0 commit comments