Commit 9cb051b
authored
### Rationale for this change
The decimal-specific `VisitInExpression` LLVM generation path embedded a raw holder pointer directly into generated object code. When Gandiva reused cached object code, the embedded pointer could become stale, leading to crashes during cached decimal `in_expr` evaluation.
### What changes are included in this PR?
- Updated decimal `in_expr` LLVM generation to load holder pointers dynamically at runtime using `arg_holder_ptrs_`, matching the existing generic `InExpression` implementation.
- Added a regression test covering cached decimal `in_expr` execution.
### Are these changes tested?
Yes.
- Reproduced the crash locally before the fix.
- Verified the new regression test passes after the fix.
- Ran:
- `TestIn.TestInDecimalCached`
- `TestIn.*`
- repeated cached execution using `--gtest_repeat=100`
### Are there any user-facing changes?
No.
**This PR contains a "Critical Fix".**
This change fixes a cache-path crash in Gandiva when evaluating decimal `in_expr` expressions using cached object code.
* GitHub Issue: #39784
Authored-by: Aaditya Srinivasan <aadityasri03@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 591c14b commit 9cb051b
2 files changed
Lines changed: 29 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1124 | 1131 | | |
1125 | 1132 | | |
1126 | 1133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 197 | | |
203 | 198 | | |
204 | 199 | | |
205 | 200 | | |
206 | | - | |
| 201 | + | |
207 | 202 | | |
208 | 203 | | |
209 | | - | |
210 | 204 | | |
211 | 205 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
215 | 211 | | |
216 | | - | |
217 | | - | |
218 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
219 | 217 | | |
220 | | - | |
221 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
0 commit comments