chovy-3012 commented on issue #13378:
URL: https://github.com/apache/seatunnel/issues/13378#issuecomment-7064419510

   Thanks for the triage and the clear acceptance criteria. Confirming the 
contract before I start:
   
   - `ENCODE` produces a SQL `BINARY` value (the charset's byte encoding of the 
string), and `DECODE` consumes that binary value; the Oracle-style conditional 
`DECODE` stays out of scope.
   - The engine boundary will be explicit in the PR: both functions ship as 
Zeta SQL built-ins (`ZetaSQLFunction` / `ZetaSQLType`, following the 
`TO_BASE64` precedent), and on the Calcite SQL path I plan to follow the 
`DES_ENCRYPT` dual-registration precedent (the `CalciteUdf` SPI bridges 
`byte[]` args/results to Calcite's binary type, so the same contract works on 
both paths). If anything blocks that during development, the PR will document 
the Zeta-only availability boundary explicitly rather than leaving a silent 
per-path difference.
   - The existing Base64 functions stay untouched. The implementation reuses 
the same string-to-binary conversion the Base64 functions already use 
(`String.getBytes(charset)` / `new String(bytes, charset)` plus the shared 
`EncodingUtils.tryParseCharset` helper), only without the Base64 envelope — so 
Base64 semantics stay fully independent.
   - The test matrix will cover everything you listed: all six declared 
charsets, string-to-binary-to-string round trips, direct binary input to 
`DECODE`, null propagation, unsupported charsets, incorrect argument 
types/counts, and absence of conditional-`DECODE` semantics.
   - The unit-test matrix above, EN/ZH function documentation, and a job-level 
integration test will all be in the same PR, before review is requested.
   
   I'll start development on this basis.
   


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