Commit 4e40f94
[KYUUBI #7109] Ignore the ? in backticks
### Why are the changes needed?
We will split the sql by `?` when we use `KyuubiPreparedStatement`. But there exist corner case when ? exist in backticks.
For example, below sql contains `?`, but we shouldn't split it by `?`.
```sql
SELECT `(ds|hr)?+.+` FROM sales
```
More details can find at https://hive.apache.org/docs/latest/languagemanual-select_27362043/#regex-column-specification
Hive upstream fix - HIVE-29060
### How was this patch tested?
UT.
### Was this patch authored or co-authored using generative AI tooling?
NO.
Closes #7125 from ruanwenjun/dev_wenjun_fix7109.
Closes #7109
7140980 [ruanwenjun] [KYUUBI #7109] Ignore the ? in backticks
Lead-authored-by: Wenjun Ruan <[email protected]>
Co-authored-by: ruanwenjun <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>1 parent e98ad7b commit 4e40f94
File tree
2 files changed
+22
-4
lines changed- kyuubi-hive-jdbc/src
- main/java/org/apache/kyuubi/jdbc/hive
- test/java/org/apache/kyuubi/jdbc/hive
2 files changed
+22
-4
lines changedLines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
152 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
| |||
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | | - | |
| 170 | + | |
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
| |||
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
194 | | - | |
| 200 | + | |
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
| |||
215 | 221 | | |
216 | 222 | | |
217 | 223 | | |
218 | | - | |
| 224 | + | |
219 | 225 | | |
220 | 226 | | |
221 | 227 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
200 | 212 | | |
201 | 213 | | |
0 commit comments