Repository navigation
Commit 08ab771
Jules Ivanic
Keep other dialects' CREATE FUNCTION off the macro route
`AS` directly after the parameters with a non-string body was not enough to tell a
DuckDB macro apart: PostgreSQL's `AS $function$ ... $function$ LANGUAGE ...` (a tagged
dollar quote lexes as an identifier), `AS U&'...' LANGUAGE ...` and BigQuery's
`AS (expr) OPTIONS (...)` became macros and failed. `isCreateFunctionMacroAhead()`
also rejects a `$tag$` body and a LANGUAGE or OPTIONS clause outside parentheses
before the end of the statement.
- `setOverloads()` copies its argument, so a null or immutable list no longer breaks
the first-overload setters.
- The Javadoc notes that, as in DuckDB, a `,` after a TABLE body ending with a list
continues that list.
- `testCreateOverloadedMacro` no longer mixes scalar and table overloads, which
DuckDB rejects; `testCreateOverloadedTableMacro` covers table overloads.1 parent 3e23858 commit 08ab771
3 files changed
Lines changed: 72 additions & 24 deletions
File tree
- src
- main
- java/net/sf/jsqlparser/statement/create/macro
- jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/select
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| 117 | + | |
113 | 118 | | |
114 | | - | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
| 1443 | + | |
1449 | 1444 | | |
1450 | 1445 | | |
1451 | 1446 | | |
1452 | 1447 | | |
1453 | 1448 | | |
1454 | 1449 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
1458 | 1464 | | |
1459 | | - | |
| 1465 | + | |
1460 | 1466 | | |
1461 | 1467 | | |
1462 | 1468 | | |
| |||
1481 | 1487 | | |
1482 | 1488 | | |
1483 | 1489 | | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1487 | 1514 | | |
1488 | 1515 | | |
1489 | 1516 | | |
| |||
20216 | 20243 | | |
20217 | 20244 | | |
20218 | 20245 | | |
| 20246 | + | |
| 20247 | + | |
20219 | 20248 | | |
20220 | 20249 | | |
20221 | 20250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
| 27 | + | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | | - | |
| 537 | + | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
540 | | - | |
| 541 | + | |
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
545 | | - | |
546 | | - | |
547 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
548 | 560 | | |
549 | 561 | | |
550 | 562 | | |
| |||
565 | 577 | | |
566 | 578 | | |
567 | 579 | | |
568 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
569 | 583 | | |
570 | 584 | | |
571 | 585 | | |
| |||
0 commit comments