(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestOperatorTransform_ArrayExpr(t *testing.T) { |
| 89 | tr := NewOperatorTransform() |
| 90 | // Semantic regression: untransformed, the raw `~` binds to DuckDB's |
| 91 | // regexp_full_match and ARRAY['abc' ~ 'b'] evaluates to [false] instead |
| 92 | // of [true]. The rewrite to regexp_matches preserves Postgres semantics. |
| 93 | out := deparseAfter(t, tr, `SELECT ARRAY['abc' ~ 'b']`) |
| 94 | if !strings.Contains(out, "regexp_matches('abc', 'b')") { |
| 95 | t.Errorf("expected regexp_matches inside ARRAY[...], got %q", out) |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | func TestOperatorTransform_DistinctOn(t *testing.T) { |
| 100 | tr := NewOperatorTransform() |
nothing calls this directly
no test coverage detected