Commit 90803e0
committed
refactor: reuse parse_order_by_expr_inner and tighten exclude tests
Follow-up to the review feedback on the EXCLUDE constraint changes:
- Replace the hand-rolled `{ expr [opclass] [ASC|DESC] [NULLS ...] }`
lookahead inside `parse_exclusion_element` with a direct call to
`parse_order_by_expr_inner(true)` so the `index_elem` grammar lives
in a single place. `WITH FILL` is gated on a separate dialect
capability, so EXCLUDE (PG-only) cannot accidentally consume it.
- Add structural assertions to `parse_exclude_constraint_desc_nulls_first`
to mirror the ascending-order test instead of relying on the
round-trip alone.
- Assert that `exclude` survives as a column name in MySQL/SQLite by
checking the parsed AST rather than `is_ok()`.
- Tighten `exclude_empty_element_list_errors` and strengthen the
operator-class and function-expression tests with explicit `expr`
assertions for completeness.
- Document why `GenericDialect` is intentionally excluded from the
rejection sweep (it opts into PG-style EXCLUDE).1 parent 2d37749 commit 90803e0
2 files changed
Lines changed: 49 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9973 | 9973 | | |
9974 | 9974 | | |
9975 | 9975 | | |
9976 | | - | |
9977 | | - | |
9978 | | - | |
9979 | | - | |
9980 | | - | |
9981 | | - | |
9982 | | - | |
9983 | | - | |
9984 | | - | |
9985 | | - | |
9986 | | - | |
9987 | | - | |
| 9976 | + | |
| 9977 | + | |
| 9978 | + | |
| 9979 | + | |
| 9980 | + | |
| 9981 | + | |
| 9982 | + | |
| 9983 | + | |
| 9984 | + | |
| 9985 | + | |
9988 | 9986 | | |
9989 | 9987 | | |
9990 | 9988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9376 | 9376 | | |
9377 | 9377 | | |
9378 | 9378 | | |
| 9379 | + | |
9379 | 9380 | | |
9380 | 9381 | | |
9381 | 9382 | | |
| |||
9405 | 9406 | | |
9406 | 9407 | | |
9407 | 9408 | | |
9408 | | - | |
9409 | | - | |
9410 | | - | |
| 9409 | + | |
| 9410 | + | |
| 9411 | + | |
| 9412 | + | |
| 9413 | + | |
| 9414 | + | |
| 9415 | + | |
| 9416 | + | |
| 9417 | + | |
| 9418 | + | |
| 9419 | + | |
9411 | 9420 | | |
9412 | 9421 | | |
9413 | 9422 | | |
| |||
9418 | 9427 | | |
9419 | 9428 | | |
9420 | 9429 | | |
9421 | | - | |
| 9430 | + | |
| 9431 | + | |
| 9432 | + | |
| 9433 | + | |
| 9434 | + | |
| 9435 | + | |
| 9436 | + | |
| 9437 | + | |
| 9438 | + | |
9422 | 9439 | | |
9423 | 9440 | | |
9424 | 9441 | | |
9425 | 9442 | | |
| 9443 | + | |
9426 | 9444 | | |
9427 | 9445 | | |
9428 | 9446 | | |
| |||
9457 | 9475 | | |
9458 | 9476 | | |
9459 | 9477 | | |
9460 | | - | |
| 9478 | + | |
| 9479 | + | |
| 9480 | + | |
| 9481 | + | |
| 9482 | + | |
9461 | 9483 | | |
9462 | 9484 | | |
9463 | 9485 | | |
| |||
9472 | 9494 | | |
9473 | 9495 | | |
9474 | 9496 | | |
| 9497 | + | |
| 9498 | + | |
9475 | 9499 | | |
9476 | 9500 | | |
9477 | 9501 | | |
| |||
9495 | 9519 | | |
9496 | 9520 | | |
9497 | 9521 | | |
9498 | | - | |
9499 | | - | |
9500 | | - | |
9501 | | - | |
| 9522 | + | |
| 9523 | + | |
| 9524 | + | |
| 9525 | + | |
| 9526 | + | |
| 9527 | + | |
| 9528 | + | |
| 9529 | + | |
| 9530 | + | |
| 9531 | + | |
9502 | 9532 | | |
9503 | 9533 | | |
0 commit comments