DanielLeens commented on issue #13378:
URL: https://github.com/apache/seatunnel/issues/13378#issuecomment-7078986926

   Classification: F / Transform-V2 SQL binary character conversion.
   
   Thanks for spelling out the binary contract and the special cases. There is 
one contract conflict to resolve before implementation: the Issue defines six 
supported charsets, but current `EncodingUtils.tryParseCharset()` accepts any 
JVM-known charset and silently maps a blank name to UTF-8. Reusing it unchanged 
would make the advertised six-name contract platform-dependent and would turn a 
blank charset into a successful call.
   
   Please keep v1 deterministic: accept only the six documented charset names 
(case-insensitively, with any explicitly documented aliases), and reject blank 
or unsupported names with a clear error. Apply null propagation before that 
validation only when the corresponding SQL argument is actually NULL. Do not 
broaden the function implicitly to every charset supplied by a particular JVM.
   
   The engine boundary also needs to be proven before a PR. `ENCODE` must 
return raw SQL `BINARY` bytes and `DECODE` must consume those bytes with the 
same argument validation and result semantics in both Zeta and Calcite. A 
Zeta-only fallback is not an acceptable silent outcome for this cross-engine 
SQL feature; if Calcite support cannot be made available through the 
`CalciteUdf` SPI and its `byte[]` bridge, bring that evidence back here before 
changing scope.
   
   The focused test plan should therefore add engine-parity assertions for 
direct binary values, the exact six-character-set allowlist and aliases, 
blank/unsupported names, null propagation, wrong types/counts, and the 
explicitly documented replacement behavior for malformed byte sequences. Keep 
Base64 and Oracle-style conditional `DECODE` independent, as proposed. Please 
post the short feasibility result for the Calcite binary path before opening 
the implementation PR.
   


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