Commit 0422eef
ESQL: Block loader for pushing LENGTH (elastic#137217)
Creates a `BlockLoader` for pushing the `LENGTH` function down into the
loader for `keyword` fields. It takes advantage of the terms dictionary
so we only need to calculate the code point count once per unique term
loaded.
This `BlockLoader` implementation isn't plugged into the infrastructure
for emitting it because we're waiting on the infrastructure we've
started in elastic#137002. We'll make a follow up PR to plug this in.
We're doing this mostly to demonstrate another function that we can push
into field loading, in addition to the vector similarity functions we're
building in elastic#137002. We don't expect `LENGTH` to be a super hot
function. If it happens to be then this'll help.
Before we plug this in we'll have to figure out emitting warnings from
functions that we've fused to field loading. Because `LENGTH` can emit a
warning, specifically when it hits a multivalued field.1 parent 086f851 commit 0422eef
File tree
8 files changed
+791
-0
lines changed- server/src
- main/java/org/elasticsearch/index/mapper
- blockloader/docvalues
- test/java/org/elasticsearch/index/mapper/blockloader/docvalues
- test/framework/src/main/java/org/elasticsearch/index/mapper
- x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/lucene/read
8 files changed
+791
-0
lines changedLines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
| |||
486 | 494 | | |
487 | 495 | | |
488 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
489 | 503 | | |
490 | 504 | | |
491 | 505 | | |
| |||
0 commit comments