Commit 185c626
committed
[jdbc-v2] Support multi-dot notation for database names
Fixes #2650
Changes:
- Updated ANTLR grammar databaseIdentifier rule to support multiple
dot-separated identifiers: identifier (DOT identifier)*
- Added extractTableName() helper method in SqlParserFacade to properly
handle multi-part table identifiers by unquoting each part separately
- Added testMultiDotNotation() test with 3 test cases covering SELECT,
INSERT, and quoted identifiers
- All 367 existing tests continue to pass
This allows database names like 'a.b' in table references such as
'a.b.c' or '`db.part1`.`table`' to be parsed correctly.1 parent d38c31b commit 185c626
File tree
3 files changed
+57
-3
lines changed- jdbc-v2/src
- main
- antlr4/com/clickhouse/jdbc/internal/parser/antlr4
- java/com/clickhouse/jdbc/internal
- test/java/com/clickhouse/jdbc/internal
3 files changed
+57
-3
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1172 | 1172 | | |
1173 | 1173 | | |
1174 | 1174 | | |
1175 | | - | |
| 1175 | + | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| |||
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
268 | 297 | | |
269 | 298 | | |
270 | 299 | | |
271 | | - | |
| 300 | + | |
272 | 301 | | |
273 | 302 | | |
274 | 303 | | |
275 | 304 | | |
276 | 305 | | |
277 | 306 | | |
278 | 307 | | |
279 | | - | |
| 308 | + | |
280 | 309 | | |
281 | 310 | | |
282 | 311 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
163 | 188 | | |
164 | 189 | | |
165 | 190 | | |
| |||
0 commit comments