Commit 18ab4dc
authored
Pushdown case function in aggregations as range queries (opensearch-project#4400)
* WIP: implementing case range analyzer
Signed-off-by: Yuanchun Shen <[email protected]>
* Correct case analyzer
Signed-off-by: Yuanchun Shen <[email protected]>
* Create bucket aggregation parsers that supports parsing nested sub aggregations
Signed-off-by: Yuanchun Shen <[email protected]>
* Fix unit tests
Signed-off-by: Yuanchun Shen <[email protected]>
* Fix parsers to multi-range cases
Signed-off-by: Yuanchun Shen <[email protected]>
* Update leaf bucket parser
Signed-off-by: Yuanchun Shen <[email protected]>
* Unit test case range analyzer
Signed-off-by: Yuanchun Shen <[email protected]>
* Add explain ITs for pushing down case in aggregations
Signed-off-by: Yuanchun Shen <[email protected]>
* Update CaseRangeAnalyzerTest
Signed-off-by: Yuanchun Shen <[email protected]>
* Add a yaml test that replicates issue 4201
Signed-off-by: Yuanchun Shen <[email protected]>
* Add integration tests for case in aggregation
Signed-off-by: Yuanchun Shen <[email protected]>
* Fix unit tests
Signed-off-by: Yuanchun Shen <[email protected]>
* Add a patch to CalcitePPLCaseFunctionIT
Signed-off-by: Yuanchun Shen <[email protected]>
* Migrate all composite aggregation parser usage to bucket aggregate parser
Signed-off-by: Yuanchun Shen <[email protected]>
* Create a parent abstract classes for BucketAggregationParsers
Signed-off-by: Yuanchun Shen <[email protected]>
* Remove an unnecessary bucket agg in AggregationQueryBuilder
Signed-off-by: Yuanchun Shen <[email protected]>
* Test pushing down case where there exists null values
Signed-off-by: Yuanchun Shen <[email protected]>
* Return empty in CaseRangeAnalyzer to unblock the rest pushdown
- Additionally test number as result expressions
Signed-off-by: Yuanchun Shen <[email protected]>
* Document limitations of pushding case as range queries
Signed-off-by: Yuanchun Shen <[email protected]>
* Make case pushdown a private method
Signed-off-by: Yuanchun Shen <[email protected]>
* Chores: remove unused helper method
Signed-off-by: Yuanchun Shen <[email protected]>
* Unify logics for creating nested aggregations
Signed-off-by: Yuanchun Shen <[email protected]>
* Remove a note in condition.rst
Signed-off-by: Yuanchun Shen <[email protected]>
* Optmize range aggregation
Signed-off-by: Yuanchun Shen <[email protected]>
* Ignore testNestedAggregationsExplain when pushdown is disabled
Signed-off-by: Yuanchun Shen <[email protected]>
* Fix explain ITs after merge
Signed-off-by: Yuanchun Shen <[email protected]>
---------
Signed-off-by: Yuanchun Shen <[email protected]>1 parent bdd42bc commit 18ab4dc
File tree
42 files changed
+2211
-143
lines changed- core/src/main/java/org/opensearch/sql/expression/function
- docs/user/ppl/functions
- integ-test/src
- test
- java/org/opensearch/sql/calcite/remote
- resources/expectedOutput
- calcite_no_pushdown
- calcite
- yamlRestTest/resources/rest-api-spec/test/issues
- opensearch/src
- main/java/org/opensearch/sql/opensearch
- request
- response/agg
- storage
- scan
- script/aggregation
- test/java/org/opensearch/sql/opensearch
- request
- storage/scan
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+2211
-143
lines changedLines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
976 | 973 | | |
977 | 974 | | |
978 | 975 | | |
979 | 976 | | |
980 | 977 | | |
981 | | - | |
982 | | - | |
| 978 | + | |
983 | 979 | | |
984 | 980 | | |
985 | 981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
| |||
Lines changed: 125 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | 517 | | |
532 | 518 | | |
533 | 519 | | |
| |||
1169 | 1155 | | |
1170 | 1156 | | |
1171 | 1157 | | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1172 | 1281 | | |
0 commit comments