Commit 15e58e9
feat: parse BigQuery JSON string literals as implicit casts (#2488)
isImplicitCastAhead() only fired for DATA_TYPE and DT_ZONE tokens, but
JSON lexes as K_JSON, so BigQuery literals like JSON '{"a": 1}' failed
to parse even though DataType() accepts K_JSON as a data type. Accept
K_JSON when directly followed by a string literal.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent fa731f9 commit 15e58e9
2 files changed
Lines changed: 14 additions & 0 deletions
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/expression
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
| 481 | + | |
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| |||
0 commit comments