ryanmeowy commented on PR #13145:
URL: https://github.com/apache/seatunnel/pull/13145#issuecomment-6682833445

   Thanks — both points taken, and they were fair: neither was introduced by my 
last commit, and neither was covered before.
   
   Head is now `f53d4181`.
   
   ### Issue 1 — user-facing compatibility guidance
   
   Added a "Pattern matching" section to `docs/en/transforms/sql.md` (`## 
Pattern matching`) and `docs/zh/transforms/sql.md` (`## 模式匹配`), covering:
   
   - LIKE / NOT LIKE: `%` and `_` in **every** position, every other character 
compared literally (with `'125' LIKE '1.5'` → `false` as the counter-example to 
the old regex interpretation), newline matching, and NULL operands never 
keeping a row.
   - RLIKE / REGEXP: regular-expression semantics, pattern used verbatim, 
`%`/`_` are ordinary characters there — this is the one that documents the 
boundary-rewrite removal.
   - Limitations: `LIKE ... ESCAPE` unsupported (and currently silently ignored 
rather than rejected), and `ILIKE` parsed but case-sensitive.
   
   Every example in that section was executed against this build rather than 
written from reading the code. The ESCAPE claim is from measurement: `'100!%' 
ESCAPE '!'` against `100%` returns `false`, so the clause is ignored, not 
honoured.
   
   Also added an entry to both 
`docs/{en,zh}/introduction/concepts/incompatible-changes.md` under `## dev`, 
listing the four behaviour changes (interior wildcards, literal metacharacters, 
newlines, regex boundary patterns) and what to review on upgrade, linking to 
the new section. That follows the precedent set by #12318 for the 
numeric-precision change, which added both a `sql.md` section and an 
incompatible-changes entry.
   
   ### Issue 2 — exercise the matcher through the configured SQL transform path
   
   Added `seatunnel-e2e/.../sql_transform/like_pattern.conf` and wired it into 
`TestSQLIT.testSQLTransform`. The fixture does not just re-check the 
direct-filter cases; it asserts on the configured job path, and its predicate 
is `where name like 'J%ng' and name not like 'Jing%'` with four `case when` 
columns:
   
   | column | expression | asserted |
   |---|---|---|
   | `like_literal_dot` | `'125' like '1.5'` | `0` |
   | `like_interior_wildcard` | `name like 'J%ng'` | `1` |
   | `rlike_regex` | `name rlike 'J.*D.*g'` | `1` |
   | `rlike_verbatim` | `name rlike 'J%ng'` | `0` |
   
   with `MIN_ROW = MAX_ROW = 1` and `equals_to` on `id` and `name`, so the 
assertion is exact rather than count-only.
   
   Verified without Docker (the daemon is not available here), by driving the 
fixture's own config through the same components the job uses: source rows → 
`SQLTransform` → `AssertRuleParser` + `AssertExecutor`. On this head it 
produces exactly `[1, Joy Ding, 0, 1, 1, 0]` and every rule passes; on the 
pre-fix evaluator the same fixture produces **0 rows** and fails `MIN_ROW = 1`, 
so it is a real regression guard rather than a test that passes both ways. I 
also confirmed the output schema is `id, name, like_literal_dot, 
like_interior_wildcard, rlike_regex, rlike_verbatim` all `INT`, so the declared 
`field_type = "int"` in the rules matches.
   
   I could not run the containerised IT itself locally (Docker unavailable), 
and the E2E module cannot be compiled offline here because its starter 
artifacts are not in the local repository — so that job's green/red comes from 
CI, not from me. The fixture config itself is validated: HOCON parses, 
`AssertRuleParser` accepts both rule lists, and the row/field expectations 
match the actual transform output as described above.
   
   `spotless:check` passes on both the transforms module and the E2E module on 
JDK 17.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to