Commit e678909
committed
refactor(esql): Improve field reference tracking in FORK command
- Enhance field reference tracking for FORK command branches
- Add branch-specific keep references tracking with `currentBranchKeepRefs`
- Refine logic for determining when to project all fields in FORK branches
- Update field collection strategy to handle more complex query scenarios
- Modify test cases to validate new field reference tracking behavior
The changes improve the field reference collection mechanism in ESQL's FORK command, providing more precise field selection and projection logic across different branch scenarios.1 parent bc5bc54 commit e678909
File tree
2 files changed
+107
-26
lines changed- x-pack/plugin/esql/src
- main/java/org/elasticsearch/xpack/esql/session
- test/java/org/elasticsearch/xpack/esql/session
2 files changed
+107
-26
lines changedLines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
122 | 128 | | |
| 129 | + | |
123 | 130 | | |
| 131 | + | |
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
| |||
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
138 | 159 | | |
139 | 160 | | |
140 | 161 | | |
| |||
189 | 210 | | |
190 | 211 | | |
191 | 212 | | |
| 213 | + | |
192 | 214 | | |
193 | 215 | | |
194 | 216 | | |
| |||
197 | 219 | | |
198 | 220 | | |
199 | 221 | | |
| 222 | + | |
200 | 223 | | |
201 | 224 | | |
202 | 225 | | |
| |||
Lines changed: 79 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
2741 | 2741 | | |
2742 | 2742 | | |
2743 | 2743 | | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
2744 | 2757 | | |
2745 | 2758 | | |
2746 | 2759 | | |
| |||
3144 | 3157 | | |
3145 | 3158 | | |
3146 | 3159 | | |
3147 | | - | |
3148 | | - | |
3149 | | - | |
3150 | | - | |
3151 | | - | |
3152 | | - | |
3153 | | - | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
3154 | 3181 | | |
3155 | 3182 | | |
3156 | 3183 | | |
3157 | 3184 | | |
3158 | 3185 | | |
3159 | 3186 | | |
3160 | | - | |
3161 | | - | |
3162 | | - | |
3163 | | - | |
3164 | | - | |
3165 | | - | |
3166 | | - | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
3167 | 3210 | | |
3168 | | - | |
3169 | | - | |
3170 | | - | |
3171 | | - | |
3172 | | - | |
3173 | | - | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
3174 | 3232 | | |
3175 | 3233 | | |
3176 | 3234 | | |
| |||
0 commit comments