You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fde4f03
Browse filesBrowse the repository at this point in the historyBrowse files
DuckDB: support the ==, ** and ~~ operators and chained signs (#2795)
* DuckDB: support the ==, ** and ~~ operators and chained signs
- `a == b` is `EqualsTo` with the `==` spelling.
- `a ** b` is the new `Exponentiation`, above the multiplicative
operators and left-associative, as in DuckDB.
- `~~`, `~~*`, `~~~`, `!~~` and `!~~*` are `LIKE`, `ILIKE`, `GLOB` and
their negations, kept as written. `a ~~ 'x'` used to parse as the
regular expression match `a ~ (~'x')`.
- `- -1`, `+-+1` and `~ ~a` nest signs. A sign is separated from an
operand starting with the same sign so that `- -1` does not deparse as
the comment `--1`, nor `~ ~a` as `~~a`.
* Keep the operator spelling of LIKE in step with the model
- The `~~` spelling is now derived from the keyword and `NOT`, so
`setNot` or `setLikeKeyWord` no longer leave a stale operator, and
`PRIOR` and `BINARY` are printed with it. `!~~~` and `null` are
rejected.
- A sign is also separated from an operand when either is `~`: DuckDB
and PostgreSQL read `-~1` as one unknown operator.
- `**` is the `OP_POWER` token; the `MulChain` alternative was never
reached.
- `visit(Exponentiation)` is a default method, so existing
`ExpressionVisitor` implementations keep compiling.
0 commit comments