Repository navigation
Commit c63f275
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 f1763dd commit c63f275
3 files changed
Lines changed: 70 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 | |
|---|---|---|---|
| |||
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
| 1428 | + | |
1434 | 1429 | | |
1435 | 1430 | | |
1436 | 1431 | | |
1437 | 1432 | | |
1438 | 1433 | | |
1439 | 1434 | | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1443 | 1449 | | |
1444 | | - | |
| 1450 | + | |
1445 | 1451 | | |
1446 | 1452 | | |
1447 | 1453 | | |
| |||
1466 | 1472 | | |
1467 | 1473 | | |
1468 | 1474 | | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1472 | 1499 | | |
1473 | 1500 | | |
1474 | 1501 | | |
| |||
20250 | 20277 | | |
20251 | 20278 | | |
20252 | 20279 | | |
| 20280 | + | |
| 20281 | + | |
20253 | 20282 | | |
20254 | 20283 | | |
20255 | 20284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
| |||
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| 39 | + | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
537 | 536 | | |
538 | 537 | | |
539 | 538 | | |
540 | | - | |
| 539 | + | |
541 | 540 | | |
542 | 541 | | |
543 | 542 | | |
544 | | - | |
| 543 | + | |
545 | 544 | | |
546 | 545 | | |
547 | 546 | | |
548 | 547 | | |
549 | | - | |
550 | | - | |
551 | | - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
552 | 562 | | |
553 | 563 | | |
554 | 564 | | |
| |||
569 | 579 | | |
570 | 580 | | |
571 | 581 | | |
572 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
573 | 585 | | |
574 | 586 | | |
575 | 587 | | |
| |||
0 commit comments