Commit 5995b0e
authored
ESQL: Reuse
Makes calls to `Expression#references()` reuse the reference set
returned by it's child when there is only one child. This should save on
many `AttributeSet`s, especially in degenerate plans that have a zillion
`EVAL`s. Things like `Alias` will always be able to reuse the child
references. So will unary functions. And probably other things.
This does require that folks treat the `references()` as immutable. I
thikn they technically are mutable, but no one I *saw* mutates them
because that's... going to break things anyway.references() (elastic#134452)1 parent 329e2c1 commit 5995b0e
File tree
2 files changed
+13
-1
lines changed- x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression
2 files changed
+13
-1
lines changedx-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression/Expression.java
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
| |||
0 commit comments