Commit b66a377
committed
Fix parsing error when having fields after nested struct in BigQuery
Before applying this patch, the following SQL cannot be parsed:
```SQL
CREATE TABLE my_table (
f0 STRING,
f1 STRUCT<a STRING, b STRUCT<c INT64, d STRING>>,
f2 STRING,
)
```
But it's a valid SQL in BigQuery. The root cause is having comma after
the trailing bracket will be reconigized as a mismatched closing.1 parent b1b379e commit b66a377
2 files changed
+51
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3034 | 3034 | | |
3035 | 3035 | | |
3036 | 3036 | | |
3037 | | - | |
3038 | 3037 | | |
3039 | 3038 | | |
3040 | 3039 | | |
| |||
3047 | 3046 | | |
3048 | 3047 | | |
3049 | 3048 | | |
3050 | | - | |
| 3049 | + | |
| 3050 | + | |
3051 | 3051 | | |
3052 | 3052 | | |
3053 | | - | |
3054 | | - | |
3055 | | - | |
3056 | | - | |
3057 | | - | |
3058 | | - | |
3059 | | - | |
3060 | 3053 | | |
3061 | 3054 | | |
3062 | 3055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
0 commit comments