Commit 75fe33d
authored
ESQL: Refactor value reading so it can split Pages (elastic#130573)
This refactors our `ValuesSourceReaderOperator` so it can split pages
when it reads large values. It does not *actually* split the pages as
that's a bit tricky. But it sets the stage for the next PR that will
do so.
* Move `ValuesSourceReaderOperator` to it's own package
* Move many inner classes into their own top level classes
* Extend from `AbstractPageMappingToIteratorOperator` instead of
`AbstractPageMappingToOperator`
* This allows returning more than one `Page` per input `Page`
* In this PR we still always return one `Page` per input `Page`
* Make new `ReleasableIterator` subclasses to satisfy
`AbstractPageMappingToIteratorOperator`
* Change `status` of loading fields from `pages_processed` to
`pages_received` and `pages_emitted`
* Fix a bug in `AbstractPageMappingToOperator` which can leak circuit
breaker allocation if we fail to during `receive`. This isn't possible
in the existing implementations but is possible
in `ValuesSourceReaderOperator`.
* Add a test with large text fields. Right now it still comes back in
one page because we don't cut the pages.
Closes elastic#1307271 parent 2b82742 commit 75fe33d
File tree
35 files changed
+1307
-878
lines changed- benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator
- server/src/main/java/org/elasticsearch
- x-pack/plugin/esql
- compute/src
- main/java
- org/elasticsearch/compute
- lucene
- read
- operator
- test/java/org/elasticsearch/compute
- lucene
- read
- operator
- qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node
- src
- internalClusterTest/java/org/elasticsearch/xpack/esql/action
- main/java/org/elasticsearch/xpack/esql
- action
- enrich
- planner
- plugin
- test/java/org/elasticsearch/xpack/esql/planner
35 files changed
+1307
-878
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
346 | | - | |
| 347 | + | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| |||
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
414 | | - | |
| 415 | + | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| 330 | + | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| 335 | + | |
| 336 | + | |
332 | 337 | | |
333 | 338 | | |
334 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
0 commit comments