Commit 7fc300f
* fix(parser): pass modifier to ExceptOp/MinusOp constructors and reset between iterations
EXCEPT ALL/DISTINCT and MINUS ALL/DISTINCT modifiers were silently
dropped during parsing because the grammar captured the modifier via
SetOperationModifier() but constructed ExceptOp and MinusOp with
their no-arg constructors (defaulting to empty string), unlike
UnionOp and IntersectOp which correctly received the modifier.
Additionally, the modifier variable was not reset between iterations
of the set-operation loop, causing modifiers to leak from one
operator to the next (e.g., UNION ALL ... EXCEPT would incorrectly
make the EXCEPT inherit ALL).
Fixes #2419
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: convert to parameterized tests, run spotlessApply
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c0e1d05 commit 7fc300f
File tree
2 files changed
+96
-3
lines changed- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/select
2 files changed
+96
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5093 | 5093 | | |
5094 | 5094 | | |
5095 | 5095 | | |
5096 | | - | |
| 5096 | + | |
5097 | 5097 | | |
5098 | 5098 | | |
5099 | 5099 | | |
| |||
5104 | 5104 | | |
5105 | 5105 | | |
5106 | 5106 | | |
5107 | | - | |
| 5107 | + | |
5108 | 5108 | | |
5109 | 5109 | | |
5110 | 5110 | | |
5111 | | - | |
| 5111 | + | |
5112 | 5112 | | |
5113 | 5113 | | |
5114 | 5114 | | |
| |||
Lines changed: 93 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
0 commit comments