Dev-next-gen commented on PR #12327:
URL: https://github.com/apache/seatunnel/pull/12327#issuecomment-6889595098

   Thanks for the close read, @SEZ9. The `-- don't` and `` `path\` `` cases 
were both good catches. I pushed 4be680c2e. After the loop, an unclosed quote 
now throws `IllegalArgumentException: Unterminated ' quote in 
save_mode_create_template`. The backslash escape only applies inside `'...'` 
and `"..."`, and `getColumnList` now has a Javadoc that covers the quote rules, 
the unterminated case and what the offsets mean. All of this is in all three 
copies. The first test now checks the offsets of a bare `creator` placed after 
`'it\'s a, b'`. Two new cases cover `"low,medium)"`, `'it''s, a'`, `` `p,q` ``, 
`` `path\` `` followed by a bare column, and an unterminated quote. The same 
test class now also runs against the MaxCompute copy. I left the deduplication 
(6) for a follow-up, as you offered.
   
   Against the dev parser the three tests fail: `expected: <[note, unit, 
creator, create_time, level, id]> but was: <[high, unit, level, id, medium]>`, 
`expected: <STRING COMMENT "low,medium)"> but was: <STRING COMMENT "low>`, and 
`Expected java.lang.IllegalArgumentException to be thrown, but nothing was 
thrown`. With this commit they pass. The connector-common, 
connector-clickhouse, connector-doris (160 tests) and connector-maxcompute (101 
tests) unit suites pass on JDK 17, and `spotless:check` passes too.
   
   On SQL comments, I did not add skipping for `--`, `#` or `/* */`. Comment 
lines in the column list did not work before this PR either. Run on `` 
`id`,\n-- keep this\n`level` STRING,\n${rowtype_fields} `` (no apostrophe), 
`getColumnList` returns `[id]` on both dev and this branch, so `level` is 
dropped either way. With `-- don't touch this` instead, dev silently returns 
`[id]`, and this branch now throws the unterminated-quote error.
   
   Found by a defect-hunting pipeline I build and run 
([Dev-next-gen](https://github.com/Dev-next-gen)), using Claude Code with 
Anthropic's Claude Opus 5.5.
   


-- 
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