Commit fac6ad2
authored
## Groovy Examples
```
table = emptyTable(1000).update("key=randomInt(0,10)", "intCol=randomInt(0,1000)")
// zero-key
t_summary = table.updateBy([
CumCountWhere("running_gt_500", "intCol > 500"),
RollingCountWhere(50, "windowed_gt_500", "intCol > 500"),
])
// bucketed
t_summary = table.updateBy([
CumCountWhere("running_gt_500", "intCol > 500"),
RollingCountWhere(50, "windowed_gt_500", "intCol > 500"),
], "key")
```
## Python Examples
```
from deephaven import empty_table
from deephaven.updateby import cum_count_where, rolling_count_where_tick
table = empty_table(1000).update(["key=randomInt(0,10)", "intCol=randomInt(0,1000)"])
# zero-key
t_summary = table.update_by([
cum_count_where(col="running_gt_500", filters="intCol > 500"),
rolling_count_where_tick(rev_ticks=50, col="windowed_gt_500", filters="intCol > 500"),
])
# bucketed
t_summary_bucketed = table.update_by([
cum_count_where(col="running_gt_500", filters="intCol > 500"),
rolling_count_where_tick(rev_ticks=50, col="windowed_gt_500", filters="intCol > 500"),
], by="key")
```
## Performance Notes
TL:DR Performance compares very well.
`RollingCountWhere()` has near identical performance to the comparison
benchmarks (can be faster depending on the complexity of the filter.
`CumCountWhere()` also compares well to `Ema()`but can't catch up to
zero-key `CumSum()`, which is is remarkably fast.
Comparing `CumCountWhere` to `CumSum` and `Ema`:
```
120000000
avg of 2
ZeroKey
CumSum 137.36250
Ema 449.5528125
CumCountWhereConstant 475.9980005
CumCountWhereMatch 649.9689995
CumCountWhereRange 654.322250
CumCountWhereMultiple 695.4477915
CumCountWhereMultipleOr 704.900583
Bucketed - 250 buckets
CumSum 2979.1730005
Ema 3024.152458
CumCountWhereConstant 2569.7280835
CumCountWhereMatch 3031.6534795
CumCountWhereRange 3030.5433335
CumCountWhereMultiple 3052.597625
CumCountWhereMultipleOr 3059.911729
Bucketed - 640 buckets
CumSum 3827.299833
Ema 3880.2538125
CumCountWhereConstant 3416.4387715
CumCountWhereMatch 3906.691333
CumCountWhereRange 3902.3064375
CumCountWhereMultiple 3967.1584795
CumCountWhereMultipleOr 3925.0775205
```
Comparing `RollingCountWhere` to `RollingCount` and `RollingSum`:
```
120000000
avg of 2
ZeroKey
RollingCount 1511.7957295
RollingSum 1513.6013545
RollingCountWhereConstant 1403.2817915
RollingCountWhereMatch 1453.9323125
RollingCountWhereRange 1764.2137915
RollingCountWhereMultiple 1576.4896255
RollingCountWhereMultipleOr 1541.5631455
Bucketed - 250 buckets
RollingCount 3468.7696665
RollingSum 3326.047792
RollingCountWhereConstant 2858.677771
RollingCountWhereMatch 3327.958604
RollingCountWhereRange 3347.961083
RollingCountWhereMultiple 3429.413562
RollingCountWhereMultipleOr 3364.244104
Bucketed - 640 buckets
RollingCount 4310.4265835
RollingSum 4286.427479
RollingCountWhereConstant 3869.1892705
RollingCountWhereMatch 4333.8479375
RollingCountWhereRange 4269.3454375
RollingCountWhereMultiple 4290.0618545
RollingCountWhereMultipleOr 4346.8478535
```
1 parent e7f731b commit fac6ad2
File tree
43 files changed
+7180
-2559
lines changed- engine/table/src
- main/java/io/deephaven/engine/table/impl/updateby
- countwhere
- internal
- rollingformulamulticolumn
- rollingformula
- rollinggroup
- test/java/io/deephaven/engine/table/impl
- updateby
- go/internal/proto/table
- java-client/session/src
- main/java/io/deephaven/client/impl
- test/java/io/deephaven/client/impl
- proto/proto-backplane-grpc/src/main/proto/deephaven_core/proto
- py
- client
- deephaven_core/proto
- pydeephaven
- tests
- server
- deephaven
- tests
- server/src/main/java/io/deephaven/server/table/ops
- table-api/src/main/java/io/deephaven/api
- agg
- updateby
- spec
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+7180
-2559
lines changedLines changed: 34 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
103 | 113 | | |
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
107 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
108 | 137 | | |
109 | 138 | | |
110 | 139 | | |
111 | 140 | | |
112 | 141 | | |
113 | | - | |
| 142 | + | |
| 143 | + | |
114 | 144 | | |
115 | 145 | | |
116 | 146 | | |
| |||
Lines changed: 146 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
414 | 424 | | |
415 | 425 | | |
416 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
417 | 433 | | |
418 | 434 | | |
419 | 435 | | |
| |||
537 | 553 | | |
538 | 554 | | |
539 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
540 | 562 | | |
541 | 563 | | |
542 | 564 | | |
| |||
1240 | 1262 | | |
1241 | 1263 | | |
1242 | 1264 | | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1243 | 1389 | | |
1244 | 1390 | | |
1245 | 1391 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
0 commit comments