Commit eea0d0b
committed
Databricks: Add support for STRUCT type with colon syntax
Add support for Databricks/Hive-style STRUCT field syntax using colons:
STRUCT<field_name: field_type, ...>
Changes:
- Add DatabricksDialect to STRUCT type parsing (alongside BigQuery/Generic)
- Modify parse_struct_field_def to handle optional colon separator between
field name and type, supporting both:
- BigQuery style: STRUCT<field_name field_type>
- Databricks/Hive style: STRUCT<field_name: field_type>
This enables parsing complex nested types like:
ARRAY<STRUCT<finish_flag: STRING, survive_flag: STRING, score: INT>>1 parent cb1cb49 commit eea0d0b
2 files changed
Lines changed: 83 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3334 | 3334 | | |
3335 | 3335 | | |
3336 | 3336 | | |
| 3337 | + | |
3337 | 3338 | | |
| 3339 | + | |
| 3340 | + | |
3338 | 3341 | | |
3339 | 3342 | | |
3340 | 3343 | | |
3341 | 3344 | | |
| 3345 | + | |
3342 | 3346 | | |
3343 | 3347 | | |
3344 | 3348 | | |
3345 | 3349 | | |
3346 | 3350 | | |
3347 | | - | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
3348 | 3355 | | |
3349 | | - | |
| 3356 | + | |
3350 | 3357 | | |
3351 | 3358 | | |
3352 | | - | |
3353 | | - | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
3354 | 3364 | | |
3355 | | - | |
| 3365 | + | |
3356 | 3366 | | |
3357 | 3367 | | |
3358 | 3368 | | |
| |||
11810 | 11820 | | |
11811 | 11821 | | |
11812 | 11822 | | |
11813 | | - | |
| 11823 | + | |
11814 | 11824 | | |
11815 | 11825 | | |
11816 | 11826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
0 commit comments