Commit 96ffaf0
authored
ESQL: Remove extra block calls in evaluators and aggregators (elastic#135919)
2 implementers changed:
- Aggregators: Change `isNull() + getValueCount()` to a single `getValueCount()`. `getValueCount()` delegates to `isNull()` internally for Array blocks, and they're supposed to be in sync.
- Evaluators: Same change, also removing an impossible branch (`getValueCount() == 0` after the `isNull() == false`)
These changes were made to:
- Improve readability/branch sanity, specially in the evaluators case.
- Slight performance improvement. itable accesses have been problematic in similar cases, and this change removes up to 25% of them. There are 2 cases:
- The position is null: We change a `isNull()` to a `getValueCount()` delegating to `isNull()` in some cases
- The position is not null: We change a `isNull() + getValueCount()` by removing the `isNull()`, which could access a `BitSet`
Aggs microbenchmarks show no differences.1 parent d02d828 commit 96ffaf0
File tree
321 files changed
+4127
-3954
lines changed- x-pack/plugin/esql
- compute
- gen/src/main/java/org/elasticsearch/compute/gen
- argument
- src/main/generated/org/elasticsearch/compute/aggregation
- spatial
- src/main/generated/org/elasticsearch/xpack/esql/expression
- function/scalar
- conditional
- convert
- date
- ip
- math
- multivalue
- score
- string
- predicate
- logical
- operator
- arithmetic
- comparison
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
321 files changed
+4127
-3954
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
| 431 | + | |
| 432 | + | |
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
| |||
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | | - | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| |||
Lines changed: 16 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
170 | 168 | | |
171 | 169 | | |
172 | 170 | | |
| |||
Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments